diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-03-01 11:15:16 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-03-05 14:15:50 +0100 |
commit | f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c (patch) | |
tree | 1f0046b53610479a7e904f210235443158440508 | |
parent | 09d1fb25c30149a04d756d80709a17f2912efb47 (diff) | |
download | rails-f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c.tar.gz rails-f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c.tar.bz2 rails-f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c.zip |
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.
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index fa8dec0e15..831b2ee2b4 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -239,9 +239,13 @@ class MigrationTest < ActiveRecord::TestCase assert_not Person.column_methods_hash.include?(:last_name) - migration = Struct.new(:name, :version) { - def migrate(x); raise 'Something broke'; end - }.new('zomg', 100) + migration = Class.new(ActiveRecord::Migration) { + def version; 100 end + def migrate(x) + add_column "people", "last_name", :string + raise 'Something broke' + end + }.new migrator = ActiveRecord::Migrator.new(:up, [migration], 100) |