1414class AdapterTestSQLServer < ActiveRecord ::TestCase
1515 fixtures :tasks
1616
17- let ( :arunit_connection ) { Topic . lease_connection }
17+ let ( :arunit_connection ) { Topic . lease_connection }
1818 let ( :arunit2_connection ) { College . lease_connection }
19- let ( :arunit_database ) { arunit_connection . pool . db_config . database }
20- let ( :arunit2_database ) { arunit2_connection . pool . db_config . database }
19+ let ( :arunit_database ) { arunit_connection . pool . db_config . database }
20+ let ( :arunit2_database ) { arunit2_connection . pool . db_config . database }
2121
2222 let ( :basic_insert_sql ) { "INSERT INTO [funny_jokes] ([name]) VALUES('Knock knock')" }
2323 let ( :basic_merge_sql ) { "MERGE INTO [ships] WITH (UPDLOCK, HOLDLOCK) AS target USING ( SELECT * FROM ( SELECT [id], [name], ROW_NUMBER() OVER ( PARTITION BY [id] ORDER BY [id] DESC ) AS rn_0 FROM ( VALUES (101, N'RSS Sir David Attenborough') ) AS t1 ([id], [name]) ) AS ranked_source WHERE rn_0 = 1 ) AS source ON (target.[id] = source.[id]) WHEN MATCHED THEN UPDATE SET target.[name] = source.[name]" }
@@ -116,13 +116,13 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
116116 db_config = ActiveRecord ::Base . configurations . configs_for ( env_name : "arunit" , name : "primary" )
117117 configuration = db_config . configuration_hash . merge ( database : "nonexistent_activerecord_unittest" )
118118 assert_not ActiveRecord ::ConnectionAdapters ::SQLServerAdapter . database_exists? ( configuration ) ,
119- "expected database #{ configuration [ :database ] } to not exist"
119+ "expected database #{ configuration [ :database ] } to not exist"
120120 end
121121
122122 it "test database exists returns true when the database exists" do
123123 db_config = ActiveRecord ::Base . configurations . configs_for ( env_name : "arunit" , name : "primary" )
124124 assert ActiveRecord ::ConnectionAdapters ::SQLServerAdapter . database_exists? ( db_config . configuration_hash ) ,
125- "expected database #{ db_config . database } to exist"
125+ "expected database #{ db_config . database } to exist"
126126 end
127127
128128 it "test primary key violation" do
@@ -476,8 +476,8 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
476476 assert_equal columns . size , SSTestCustomersView . columns . size
477477 columns . each do |colname |
478478 assert_instance_of ActiveRecord ::ConnectionAdapters ::SQLServer ::Column ,
479- SSTestCustomersView . columns_hash [ colname ] ,
480- "Column name #{ colname . inspect } was not found in these columns #{ SSTestCustomersView . columns . map ( &:name ) . inspect } "
479+ SSTestCustomersView . columns_hash [ colname ] ,
480+ "Column name #{ colname . inspect } was not found in these columns #{ SSTestCustomersView . columns . map ( &:name ) . inspect } "
481481 end
482482 end
483483
@@ -503,8 +503,8 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
503503 assert_equal columns . size , SSTestStringDefaultsView . columns . size
504504 columns . each do |colname |
505505 assert_instance_of ActiveRecord ::ConnectionAdapters ::SQLServer ::Column ,
506- SSTestStringDefaultsView . columns_hash [ colname ] ,
507- "Column name #{ colname . inspect } was not found in these columns #{ SSTestStringDefaultsView . columns . map ( &:name ) . inspect } "
506+ SSTestStringDefaultsView . columns_hash [ colname ] ,
507+ "Column name #{ colname . inspect } was not found in these columns #{ SSTestStringDefaultsView . columns . map ( &:name ) . inspect } "
508508 end
509509 end
510510
@@ -516,7 +516,7 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
516516
517517 it "find default values" do
518518 assert_equal "null" , SSTestStringDefaultsView . new . pretend_null ,
519- SSTestStringDefaultsView . columns_hash [ "pretend_null" ] . inspect
519+ SSTestStringDefaultsView . columns_hash [ "pretend_null" ] . inspect
520520 end
521521
522522 it "respond true to data_source_exists?" do
@@ -531,7 +531,7 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
531531
532532 it "using alternate view definition still be able to find real default" do
533533 assert_equal "null" , SSTestStringDefaultsBigView . new . pretend_null ,
534- SSTestStringDefaultsBigView . columns_hash [ "pretend_null" ] . inspect
534+ SSTestStringDefaultsBigView . columns_hash [ "pretend_null" ] . inspect
535535 end
536536 end
537537
0 commit comments