Skip to content

Commit ffa4ff3

Browse files
committed
Use non-random Minitest just like Rails core.
1 parent 4ae77fe commit ffa4ff3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
22
gemspec
33

44
gem 'sqlite3'
5-
gem 'minitest', '~> 5.9.0'
5+
gem 'minitest', '< 5.3.4'
66
gem 'bcrypt', platforms: [:mri]
77
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
88

test/cases/coerced_tests.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,15 @@ def test_remove_column_with_multi_column_index_coerced
206206
assert_equal [], connection.indexes('test_models').map(&:name)
207207
end
208208
end
209+
210+
# Choose `StatementInvalid` vs `ActiveRecordError`.
211+
coerce_tests! :test_rename_nonexistent_column
212+
def test_rename_nonexistent_column
213+
exception = ActiveRecord::StatementInvalid
214+
assert_raise(exception) do
215+
rename_column "test_models", "nonexistent", "should_fail"
216+
end
217+
end
209218
end
210219
end
211220

0 commit comments

Comments
 (0)