[rspec-users] Verify Order

Frank Lakatos me at franklakatos.com
Thu Mar 4 01:03:57 EST 2010


I may be missing something obvious, but how do I verify sort order?

I have

class Project < ActiveRecord::Base
   has_many :tasks, :order => "position"
end


I create a project, and 2 tasks: one with position = 1 and the other  
with position = 2. I want to verify that Project.tasks orders the  
tasks so that the task with position = 1 comes before the task with  
position = 2.

Little push would be great, thanks

Frank


More information about the rspec-users mailing list