diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-08 23:23:51 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-08 23:23:51 +0100 |
commit | 79411322ae225289e1c051f4f68ed84c6349e4a0 (patch) | |
tree | 424499366dc9c7ced8a271756b86a865ce17c977 /test/visitors/test_to_sql.rb | |
parent | 03b6ca269ac8dfec8f70f2b98439d45b873f9e97 (diff) | |
download | rails-79411322ae225289e1c051f4f68ed84c6349e4a0.tar.gz rails-79411322ae225289e1c051f4f68ed84c6349e4a0.tar.bz2 rails-79411322ae225289e1c051f4f68ed84c6349e4a0.zip |
Make it the responsibility of the connection to hold on to a visitor for generating SQL, rather than the TreeManager. (There is a related commit coming in Active Record.)
Diffstat (limited to 'test/visitors/test_to_sql.rb')
-rw-r--r-- | test/visitors/test_to_sql.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 3b58c71cd8..12af197596 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -8,7 +8,7 @@ module Arel module Visitors describe 'the to_sql visitor' do before do - @visitor = ToSql.new Table.engine + @visitor = ToSql.new Table.engine.connection_pool @table = Table.new(:users) @attr = @table[:id] end @@ -220,7 +220,7 @@ module Arel end end in_node = Nodes::In.new @attr, %w{ a b c } - visitor = visitor.new(Table.engine) + visitor = visitor.new(Table.engine.connection_pool) visitor.expected = Table.engine.connection.columns(:users).find { |x| x.name == 'name' } @@ -308,7 +308,7 @@ module Arel end end in_node = Nodes::NotIn.new @attr, %w{ a b c } - visitor = visitor.new(Table.engine) + visitor = visitor.new(Table.engine.connection_pool) visitor.expected = Table.engine.connection.columns(:users).find { |x| x.name == 'name' } |