./test/enumerable_test.rb in ambition-0.1.5 vs ./test/enumerable_test.rb in ambition-0.1.6

- old
+ new

@@ -8,26 +8,26 @@ puts user.name end end specify "limit and conditions" do - hash = { :limit => '5', :conditions => "users.age = 21" } + hash = { :limit => 5, :conditions => "users.age = 21" } User.expects(:find).with(:all, hash).returns([]) User.select { |m| m.age == 21 }.first(5).each do |user| puts user.name end end specify "limit and conditions and order" do - hash = { :limit => '5', :conditions => "users.age = 21", :order => 'users.name' } + hash = { :limit => 5, :conditions => "users.age = 21", :order => 'users.name' } User.expects(:find).with(:all, hash).returns([]) User.select { |m| m.age == 21 }.sort_by { |m| m.name }.first(5).each do |user| puts user.name end end specify "limit and order" do - hash = { :limit => '5', :order => 'users.name' } + hash = { :limit => 5, :order => 'users.name' } User.expects(:find).with(:all, hash).returns([]) User.sort_by { |m| m.name }.first(5).each do |user| puts user.name end end