diff options
Diffstat (limited to 'test/nodes/test_ascending.rb')
-rw-r--r-- | test/nodes/test_ascending.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/nodes/test_ascending.rb b/test/nodes/test_ascending.rb index 0e2c4810c6..63d758a8a8 100644 --- a/test/nodes/test_ascending.rb +++ b/test/nodes/test_ascending.rb @@ -29,6 +29,16 @@ module Arel ascending = Ascending.new 'zomg' assert !ascending.descending? end + + def test_equality_with_same_ivars + array = [Ascending.new('zomg'), Ascending.new('zomg')] + assert_equal 1, array.uniq.size + end + + def test_inequality_with_different_ivars + array = [Ascending.new('zomg'), Ascending.new('zomg!')] + assert_equal 2, array.uniq.size + end end end end |