Sha256: fb90e108c2d30a89ae63b7cca5f93bcb8b007cf99cf09e08958c4d71875ff786

Contents?: true

Size: 613 Bytes

Versions: 11

Compression:

Stored size: 613 Bytes

Contents

require 'helper'

module Arel
  module Nodes
    describe 'Grouping' do
      it 'should create Equality nodes' do
        grouping = Grouping.new('foo')
        grouping.eq('foo').to_sql.must_be_like %q{('foo') = 'foo'}
      end

      describe 'equality' do
        it 'is equal with equal ivars' do
          array = [Grouping.new('foo'), Grouping.new('foo')]
          assert_equal 1, array.uniq.size
        end

        it 'is not equal with different ivars' do
          array = [Grouping.new('foo'), Grouping.new('bar')]
          assert_equal 2, array.uniq.size
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/test/nodes/test_grouping.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/test/nodes/test_grouping.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/test/nodes/test_grouping.rb
arel-5.0.1.20140414130214 test/nodes/test_grouping.rb
arel-4.0.2 test/nodes/test_grouping.rb
arel-5.0.0 test/nodes/test_grouping.rb
arel-4.0.1 test/nodes/test_grouping.rb
challah-1.0.0 vendor/bundle/gems/arel-4.0.0/test/nodes/test_grouping.rb
arel-4.0.0 test/nodes/test_grouping.rb
arel-4.0.0.beta2 test/nodes/test_grouping.rb
arel-4.0.0.beta1 test/nodes/test_grouping.rb