diff options
author | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2013-12-05 00:18:22 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafael.franca@plataformatec.com.br> | 2013-12-05 00:18:22 -0200 |
commit | 0507bc3f58b7d6a36d93dcd5c21d7f40e9322c80 (patch) | |
tree | 8e888126f7e24b494e746cfe0081aa3bb6ea9193 | |
parent | f1192f74282850ba2884d55934732ceb4ae5f891 (diff) | |
download | rails-0507bc3f58b7d6a36d93dcd5c21d7f40e9322c80.tar.gz rails-0507bc3f58b7d6a36d93dcd5c21d7f40e9322c80.tar.bz2 rails-0507bc3f58b7d6a36d93dcd5c21d7f40e9322c80.zip |
Remove deprecated calls from the tests
-rw-r--r-- | lib/arel/visitors/mssql.rb | 4 | ||||
-rw-r--r-- | test/test_crud.rb | 2 | ||||
-rw-r--r-- | test/test_select_manager.rb | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/arel/visitors/mssql.rb b/lib/arel/visitors/mssql.rb index 9a88ee5b0f..2f5edce19a 100644 --- a/lib/arel/visitors/mssql.rb +++ b/lib/arel/visitors/mssql.rb @@ -62,8 +62,8 @@ module Arel x.projections.length == 1 && Arel::Nodes::Count === x.projections.first end - # fixme raise exception of there is no pk? - # fixme!! Table.primary_key will be depricated. What is the replacement?? + # FIXME raise exception of there is no pk? + # FIXME!! Table.primary_key will be deprecated. What is the replacement?? def find_left_table_pk o, a return visit o.primary_key, a if o.instance_of? Arel::Table find_left_table_pk o.left, a if o.kind_of? Arel::Nodes::Join diff --git a/test/test_crud.rb b/test/test_crud.rb index ded1b632b7..5c470155ac 100644 --- a/test/test_crud.rb +++ b/test/test_crud.rb @@ -45,7 +45,7 @@ module Arel table = Table.new :users fc = FakeCrudder.new fc.from table - stmt = fc.compile_update [[table[:id], 'foo']], table.primary_key + stmt = fc.compile_update [[table[:id], 'foo']], Arel::Attributes::Attribute.new(table, 'id') assert_instance_of Arel::UpdateManager, stmt end end diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index 960e2b1a02..b2db28753b 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -921,7 +921,7 @@ module Arel manager = Arel::SelectManager.new engine manager.from table manager.take 1 - stmt = manager.compile_update(SqlLiteral.new('foo = bar'), table.primary_key) + stmt = manager.compile_update(SqlLiteral.new('foo = bar'), Arel::Attributes::Attribute.new(table, 'id')) stmt.key = table['id'] stmt.to_sql.must_be_like %{ @@ -936,7 +936,7 @@ module Arel manager = Arel::SelectManager.new engine manager.from table manager.order :foo - stmt = manager.compile_update(SqlLiteral.new('foo = bar'), table.primary_key) + stmt = manager.compile_update(SqlLiteral.new('foo = bar'), Arel::Attributes::Attribute.new(table, 'id')) stmt.key = table['id'] stmt.to_sql.must_be_like %{ @@ -950,7 +950,7 @@ module Arel table = Table.new :users manager = Arel::SelectManager.new engine manager.from table - stmt = manager.compile_update(SqlLiteral.new('foo = bar'), table.primary_key) + stmt = manager.compile_update(SqlLiteral.new('foo = bar'), Arel::Attributes::Attribute.new(table, 'id')) stmt.to_sql.must_be_like %{ UPDATE "users" SET foo = bar } end @@ -961,7 +961,7 @@ module Arel manager = Arel::SelectManager.new engine manager.where table[:id].eq 10 manager.from table - stmt = manager.compile_update({table[:id] => 1}, table.primary_key) + stmt = manager.compile_update({table[:id] => 1}, Arel::Attributes::Attribute.new(table, 'id')) stmt.to_sql.must_be_like %{ UPDATE "users" SET "id" = 1 WHERE "users"."id" = 10 @@ -975,7 +975,7 @@ module Arel manager.where table[:foo].eq 10 manager.take 42 manager.from table - stmt = manager.compile_update({table[:id] => 1}, table.primary_key) + stmt = manager.compile_update({table[:id] => 1}, Arel::Attributes::Attribute.new(table, 'id')) stmt.to_sql.must_be_like %{ UPDATE "users" SET "id" = 1 WHERE "users"."id" IN (SELECT "users"."id" FROM "users" WHERE "users"."foo" = 10 LIMIT 42) @@ -987,7 +987,7 @@ module Arel table = Table.new :users manager = Arel::SelectManager.new engine manager.from table - stmt = manager.compile_update({table[:id] => 1}, table.primary_key) + stmt = manager.compile_update({table[:id] => 1}, Arel::Attributes::Attribute.new(table, 'id')) stmt.to_sql.must_be_like %{ UPDATE "users" SET "id" = 1 |