mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
22 lines
554 B
Ruby
22 lines
554 B
Ruby
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
|
|
|