@@ -16,7 +16,7 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
1616 assert_line :tinyint , type : "integer" , limit : 1 , precision : nil , scale : nil , default : 42
1717 assert_line :bit , type : "boolean" , limit : nil , precision : nil , scale : nil , default : true
1818 assert_line :decimal_9_2 , type : "decimal" , limit : nil , precision : 9 , scale : 2 , default : 12345.01
19- assert_line :numeric_18_0 , type : "decimal" , limit : nil , precision : 18 , scale : 0 , default : 191.0
19+ assert_line :numeric_18_0 , type : "decimal" , limit : nil , precision : 18 , scale : nil , default : 191
2020 assert_line :numeric_36_2 , type : "decimal" , limit : nil , precision : 36 , scale : 2 , default : 12345678901234567890.01
2121 assert_line :money , type : "money" , limit : nil , precision : 19 , scale : 4 , default : 4.2
2222 assert_line :smallmoney , type : "smallmoney" , limit : nil , precision : 10 , scale : 4 , default : 4.2
@@ -75,7 +75,7 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
7575 assert_line :integer_col , type : "integer" , limit : nil , precision : nil , scale : nil , default : nil
7676 assert_line :bigint_col , type : "bigint" , limit : nil , precision : nil , scale : nil , default : nil
7777 assert_line :boolean_col , type : "boolean" , limit : nil , precision : nil , scale : nil , default : nil
78- assert_line :decimal_col , type : "decimal" , limit : nil , precision : 18 , scale : 0 , default : nil
78+ assert_line :decimal_col , type : "decimal" , limit : nil , precision : 18 , scale : nil , default : nil
7979 assert_line :float_col , type : "float" , limit : nil , precision : nil , scale : nil , default : nil
8080 assert_line :string_col , type : "string" , limit : nil , precision : nil , scale : nil , default : nil
8181 assert_line :text_col , type : "text" , limit : nil , precision : nil , scale : nil , default : nil
@@ -166,13 +166,15 @@ def line(column_name)
166166
167167 def assert_line ( column_name , options = { } )
168168 line = line ( column_name )
169- assert line , "Count not find line with column name: #{ column_name . inspect } in schema:\n #{ schema } "
169+ assert line , "Could not find line with column name: #{ column_name . inspect } in schema:\n #{ schema } "
170+
170171 [ :type , :limit , :precision , :scale , :collation , :default ] . each do |key |
171172 next unless options . key? ( key )
172173
173174 actual = key == :type ? line . send ( :type_method ) : line . send ( key )
174175 expected = options [ key ]
175176 message = "#{ key . to_s . titleize } of #{ expected . inspect } not found in:\n #{ line } "
177+
176178 if expected . nil?
177179 _ ( actual ) . must_be_nil message
178180 elsif expected . is_a? ( Array )
0 commit comments