From f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 1 Mar 2013 11:15:16 +0100 Subject: 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. --- activerecord/test/cases/migration_test.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'activerecord') 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) -- cgit v1.2.3