Skip to content

Commit

Permalink
Added tests for nil, range and array arguments for "equals" comparisons.
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Johnson <bjohnson@binarylogic.com>
  • Loading branch information
laserlemon authored and binarylogic committed Aug 19, 2009
1 parent d3ea7de commit 5288f08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/named_scopes/conditions_spec.rb
Expand Up @@ -15,6 +15,9 @@
it "should have equals" do
(5..7).each { |age| User.create(:age => age) }
User.age_equals(6).all.should == User.find_all_by_age(6)
User.age_equals(nil).all.should == User.find_all_by_age(nil)
User.age_equals(5..6).all.should == User.find_all_by_age(5..6)
User.age_equals([5, 7]).all.should == User.find_all_by_age([5, 7])
end

it "should have does not equal" do
Expand Down

0 comments on commit 5288f08

Please sign in to comment.