Skip to content

Commit a0c301c

Browse files
takanamitowpolicarpo
authored andcommitted
Prepare for Minitest6
1 parent 87f5609 commit a0c301c

17 files changed

+641
-641
lines changed

test/cases/adapter_test_sqlserver.rb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
1515

1616
it 'has basic and non-senstive information in the adpaters inspect method' do
1717
string = connection.inspect
18-
string.must_match %r{ActiveRecord::ConnectionAdapters::SQLServerAdapter}
19-
string.must_match %r{version\: \d.\d}
20-
string.must_match %r{mode: dblib}
21-
string.must_match %r{azure: (true|false)}
22-
string.wont_match %r{host}
23-
string.wont_match %r{password}
24-
string.wont_match %r{username}
25-
string.wont_match %r{port}
18+
_(string).must_match %r{ActiveRecord::ConnectionAdapters::SQLServerAdapter}
19+
_(string).must_match %r{version\: \d.\d}
20+
_(string).must_match %r{mode: dblib}
21+
_(string).must_match %r{azure: (true|false)}
22+
_(string).wont_match %r{host}
23+
_(string).wont_match %r{password}
24+
_(string).wont_match %r{username}
25+
_(string).wont_match %r{port}
2626
end
2727

2828
it 'has a 128 max #table_alias_length' do
@@ -161,7 +161,7 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
161161
end
162162

163163
it 'return an empty array when calling #identity_columns for a table_name with no identity' do
164-
connection.send(:identity_columns, Subscriber.table_name).must_equal []
164+
_(connection.send(:identity_columns, Subscriber.table_name)).must_equal []
165165
end
166166

167167
end
@@ -303,7 +303,7 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
303303
end
304304

305305
it 'find SSTestCustomersView table name' do
306-
connection.views.must_include 'sst_customers_view'
306+
_(connection.views).must_include 'sst_customers_view'
307307
end
308308

309309
it 'work with dynamic finders' do
@@ -344,9 +344,9 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
344344
end
345345

346346
it 'find identity column' do
347-
SSTestCustomersView.primary_key.must_equal 'id'
348-
connection.primary_key(SSTestCustomersView.table_name).must_equal 'id'
349-
SSTestCustomersView.columns_hash['id'].must_be :is_identity?
347+
_(SSTestCustomersView.primary_key).must_equal 'id'
348+
_(connection.primary_key(SSTestCustomersView.table_name)).must_equal 'id'
349+
_(SSTestCustomersView.columns_hash['id']).must_be :is_identity?
350350
end
351351

352352
it 'find default values' do
@@ -371,9 +371,9 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
371371
end
372372

373373
it 'find identity column' do
374-
SSTestStringDefaultsView.primary_key.must_equal 'id'
375-
connection.primary_key(SSTestStringDefaultsView.table_name).must_equal 'id'
376-
SSTestStringDefaultsView.columns_hash['id'].must_be :is_identity?
374+
_(SSTestStringDefaultsView.primary_key).must_equal 'id'
375+
_(connection.primary_key(SSTestStringDefaultsView.table_name)).must_equal 'id'
376+
_(SSTestStringDefaultsView.columns_hash['id']).must_be :is_identity?
377377
end
378378

379379
it 'find default values' do
@@ -422,8 +422,8 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
422422

423423
it 'in_memory_oltp' do
424424
if ENV['IN_MEMORY_OLTP'] && connection.supports_in_memory_oltp?
425-
SSTMemory.primary_key.must_equal 'id'
426-
SSTMemory.columns_hash['id'].must_be :is_identity?
425+
_(SSTMemory.primary_key).must_equal 'id'
426+
_(SSTMemory.columns_hash['id']).must_be :is_identity?
427427
else
428428
skip 'supports_in_memory_oltp? => false'
429429
end

test/cases/change_column_null_test_sqlserver.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ def find_column(table, name)
2424

2525
describe '#change_column_null' do
2626
it 'does not change the column limit' do
27-
name_column.limit.must_equal 15
27+
_(name_column.limit).must_equal 15
2828
end
2929

3030
it 'does not change the column default' do
31-
code_column.default.must_equal 'n/a'
31+
_(code_column.default).must_equal 'n/a'
3232
end
3333

3434
it 'does not change the column precision' do
35-
value_column.precision.must_equal 32
35+
_(value_column.precision).must_equal 32
3636
end
3737

3838
it 'does not change the column scale' do
39-
value_column.scale.must_equal 8
39+
_(value_column.scale).must_equal 8
4040
end
4141
end
4242
end

0 commit comments

Comments
 (0)