Skip to content
This repository
Browse code

transactional migration test-case was broken.

The cleanup commit a85625d broke the test-case.
The schema was no longer modified so there was no
way to check that the rollback actually happened.
  • Loading branch information...
commit f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c 1 parent 09d1fb2
Yves Senn senny authored

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. +7 3 activerecord/test/cases/migration_test.rb
10 activerecord/test/cases/migration_test.rb
@@ -239,9 +239,13 @@ def test_migrator_one_up_with_exception_and_rollback
239 239
240 240 assert_not Person.column_methods_hash.include?(:last_name)
241 241
242   - migration = Struct.new(:name, :version) {
243   - def migrate(x); raise 'Something broke'; end
244   - }.new('zomg', 100)
  242 + migration = Class.new(ActiveRecord::Migration) {
  243 + def version; 100 end
  244 + def migrate(x)
  245 + add_column "people", "last_name", :string
  246 + raise 'Something broke'
  247 + end
  248 + }.new
245 249
246 250 migrator = ActiveRecord::Migrator.new(:up, [migration], 100)
247 251

0 comments on commit f1241ef

Please sign in to comment.
Something went wrong with that request. Please try again.