Skip to content

Commit 30d3945

Browse files
author
Anna
committed
switched to rails 1.9 hash syntax
1 parent 15101d6 commit 30d3945

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/cases/schema_dumper_test_sqlserver.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ class SchemaDumperTestSqlserver < ActiveRecord::TestCase
1111
table_dump('movies') do |output|
1212
match = output.match(%r{create_table "movies"(.*)do})
1313
assert_not_nil(match, "nonstandardpk table not found")
14-
assert_match %r(:primary_key => "movieid"), match[1], "non-standard primary key not preserved"
14+
puts "**#{output}"
15+
assert_match %r(primary_key: "movieid"), match[1], "non-standard primary key not preserved"
1516
end
1617
end
1718

@@ -21,16 +22,16 @@ class SchemaDumperTestSqlserver < ActiveRecord::TestCase
2122

2223
should 'include limit constraint that match logic for smallint and bigint in #extract_limit' do
2324
table_dump('integer_limits') do |output|
24-
assert_match %r{c_int_1.*:limit => 2}, output
25-
assert_match %r{c_int_2.*:limit => 2}, output
25+
assert_match %r{c_int_1.*limit: 2}, output
26+
assert_match %r{c_int_2.*limit: 2}, output
2627
assert_match %r{c_int_3.*}, output
2728
assert_match %r{c_int_4.*}, output
2829
assert_no_match %r{c_int_3.*:limit}, output
2930
assert_no_match %r{c_int_4.*:limit}, output
30-
assert_match %r{c_int_5.*:limit => 8}, output
31-
assert_match %r{c_int_6.*:limit => 8}, output
32-
assert_match %r{c_int_7.*:limit => 8}, output
33-
assert_match %r{c_int_8.*:limit => 8}, output
31+
assert_match %r{c_int_5.*limit: 8}, output
32+
assert_match %r{c_int_6.*limit: 8}, output
33+
assert_match %r{c_int_7.*limit: 8}, output
34+
assert_match %r{c_int_8.*limit: 8}, output
3435
end
3536
end
3637

@@ -79,7 +80,7 @@ class SchemaDumperTest < ActiveRecord::TestCase
7980

8081
def test_coerced_schema_dump_keeps_large_precision_integer_columns_as_decimal
8182
output = standard_dump
82-
assert_match %r{t.decimal\s+"atoms_in_universe",\s+:precision => 38,\s+:scale => 0}, output
83+
assert_match %r{t.decimal\s+"atoms_in_universe",\s+precision: 38,\s+scale: 0}, output
8384
end
8485

8586
private

0 commit comments

Comments
 (0)