Skip to content

Commit

Permalink
transactional migration test-case was broken.
Browse files Browse the repository at this point in the history
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
senny committed Mar 5, 2013
1 parent 09d1fb2 commit f1241ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions activerecord/test/cases/migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,13 @@ def test_migrator_one_up_with_exception_and_rollback

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)

Expand Down

0 comments on commit f1241ef

Please sign in to comment.