diff options
Diffstat (limited to 'test/nodes/test_and.rb')
-rw-r--r-- | test/nodes/test_and.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/nodes/test_and.rb b/test/nodes/test_and.rb new file mode 100644 index 0000000000..88d6d61531 --- /dev/null +++ b/test/nodes/test_and.rb @@ -0,0 +1,20 @@ +require 'helper' + +module Arel + module Nodes + describe 'And' do + describe 'equality' do + it 'is equal with equal ivars' do + array = [And.new(['foo', 'bar']), And.new(['foo', 'bar'])] + assert_equal 1, array.uniq.size + end + + it 'is not equal with different ivars' do + array = [And.new(['foo', 'bar']), And.new(['foo', 'baz'])] + assert_equal 2, array.uniq.size + end + end + end + end +end + |