diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-28 12:05:19 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-28 12:05:19 -0700 |
commit | 941d5c1f4051416e1b7993374343e343027978a7 (patch) | |
tree | e24187f402a1247cda71b7d92295bf443a0d0877 /activerecord/test/cases | |
parent | a5cb5a5af611481e7a69b160983fcac68f37088c (diff) | |
parent | c278a2c5e109204ec8a47fcbfdfc327aad7996ce (diff) | |
download | rails-941d5c1f4051416e1b7993374343e343027978a7.tar.gz rails-941d5c1f4051416e1b7993374343e343027978a7.tar.bz2 rails-941d5c1f4051416e1b7993374343e343027978a7.zip |
Merge pull request #1857 from vijaydev/irreversible-migration
IrreversibleMigration is not raised when a method not supported by reversible migrations is called in the change method of a migration
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration/command_recorder_test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index 0f79c99e1a..a03c80bf93 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -14,9 +14,11 @@ module ActiveRecord assert recorder.respond_to?(:america) end - def test_send_calls_super - assert_raises(NoMethodError) do - @recorder.send(:non_existing_method, :horses) + def test_non_existing_method_records_and_raises_on_inversion + @recorder.send(:non_existing_method, :horses) + assert_equal 1, @recorder.commands.length + assert_raises(ActiveRecord::IrreversibleMigration) do + @recorder.inverse end end |