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 | |
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')
-rw-r--r-- | test/visitors/test_ibm_db.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_informix.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_join_sql.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_mssql.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_mysql.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_oracle.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_postgres.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_sqlite.rb | 2 | ||||
-rw-r--r-- | test/visitors/test_to_sql.rb | 6 |
9 files changed, 11 insertions, 11 deletions
diff --git a/test/visitors/test_ibm_db.rb b/test/visitors/test_ibm_db.rb index cc35bb768d..90008ba05e 100644 --- a/test/visitors/test_ibm_db.rb +++ b/test/visitors/test_ibm_db.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the ibm_db visitor' do before do - @visitor = IBM_DB.new Table.engine + @visitor = IBM_DB.new Table.engine.connection_pool end it 'uses FETCH FIRST n ROWS to limit results' do diff --git a/test/visitors/test_informix.rb b/test/visitors/test_informix.rb index a8a52a0160..422da846fe 100644 --- a/test/visitors/test_informix.rb +++ b/test/visitors/test_informix.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the informix visitor' do before do - @visitor = Informix.new Table.engine + @visitor = Informix.new Table.engine.connection_pool end it 'uses LIMIT n to limit results' do diff --git a/test/visitors/test_join_sql.rb b/test/visitors/test_join_sql.rb index b672f88ecf..6f7440cc47 100644 --- a/test/visitors/test_join_sql.rb +++ b/test/visitors/test_join_sql.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the join_sql visitor' do before do - @visitor = ToSql.new Table.engine + @visitor = ToSql.new Table.engine.connection_pool @visitor.extend(JoinSql) end diff --git a/test/visitors/test_mssql.rb b/test/visitors/test_mssql.rb index 8b2b756900..21588f53cf 100644 --- a/test/visitors/test_mssql.rb +++ b/test/visitors/test_mssql.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the mssql visitor' do before do - @visitor = MSSQL.new Table.engine + @visitor = MSSQL.new Table.engine.connection_pool @table = Arel::Table.new "users" end diff --git a/test/visitors/test_mysql.rb b/test/visitors/test_mysql.rb index 8d220ac04b..487db325e8 100644 --- a/test/visitors/test_mysql.rb +++ b/test/visitors/test_mysql.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the mysql visitor' do before do - @visitor = MySQL.new Table.engine + @visitor = MySQL.new Table.engine.connection_pool end it 'squashes parenthesis on multiple unions' do diff --git a/test/visitors/test_oracle.rb b/test/visitors/test_oracle.rb index eaf68013a7..b53690a1a8 100644 --- a/test/visitors/test_oracle.rb +++ b/test/visitors/test_oracle.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the oracle visitor' do before do - @visitor = Oracle.new Table.engine + @visitor = Oracle.new Table.engine.connection_pool end it 'modifies order when there is distinct and first value' do diff --git a/test/visitors/test_postgres.rb b/test/visitors/test_postgres.rb index 446eae0c4a..e8df681269 100644 --- a/test/visitors/test_postgres.rb +++ b/test/visitors/test_postgres.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the postgres visitor' do before do - @visitor = PostgreSQL.new Table.engine + @visitor = PostgreSQL.new Table.engine.connection_pool end describe 'locking' do diff --git a/test/visitors/test_sqlite.rb b/test/visitors/test_sqlite.rb index fb8392c504..5b81ea90c5 100644 --- a/test/visitors/test_sqlite.rb +++ b/test/visitors/test_sqlite.rb @@ -4,7 +4,7 @@ module Arel module Visitors describe 'the sqlite visitor' do before do - @visitor = SQLite.new Table.engine + @visitor = SQLite.new Table.engine.connection_pool end it 'defaults limit to -1' do 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' } |