Sha256: 5b10a11103524a655336a35066ad85c512648c461c71c46e1cd8fd31a046b8d3

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

require 'helper'
require 'set'

module Arel
  module Nodes
    describe 'Binary' do
      describe '#hash' do
        it 'generates a hash based on its value' do
          eq = Equality.new('foo', 'bar')
          eq2 = Equality.new('foo', 'bar')
          eq3 = Equality.new('bar', 'baz')

          assert_equal eq.hash, eq2.hash
          refute_equal eq.hash, eq3.hash
        end

        it 'generates a hash specific to its class' do
          eq = Equality.new('foo', 'bar')
          neq = NotEqual.new('foo', 'bar')

          refute_equal eq.hash, neq.hash
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arel-6.0.0.beta2 test/nodes/test_binary.rb