Sha256: 2b88f4ce21f0275c9b56d65bbcc729ed1601b7852c75ac64d7b9ed18f0659bae

Contents?: true

Size: 554 Bytes

Versions: 9

Compression:

Stored size: 554 Bytes

Contents

require 'helper'

module Arel
  module Visitors
    describe 'avoiding contamination between visitor dispatch tables' do
      before do
        @connection = Table.engine.connection
        @table = Table.new(:users)
      end

      it 'dispatches properly after failing upwards' do
        node = Nodes::Union.new(Nodes::True.new, Nodes::False.new)
        assert_equal "( TRUE UNION FALSE )", node.to_sql

        node.first # from Nodes::Node's Enumerable mixin

        assert_equal "( TRUE UNION FALSE )", node.to_sql
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/test/visitors/test_dispatch_contamination.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/test/visitors/test_dispatch_contamination.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/test/visitors/test_dispatch_contamination.rb
arel-6.0.0.beta2 test/visitors/test_dispatch_contamination.rb
arel-6.0.0.beta1 test/visitors/test_dispatch_contamination.rb
arel-5.0.1.20140414130214 test/visitors/test_dispatch_contamination.rb
arel-4.0.2 test/visitors/test_dispatch_contamination.rb
arel-5.0.0 test/visitors/test_dispatch_contamination.rb
arel-4.0.1 test/visitors/test_dispatch_contamination.rb