Ruby code for order test