From 15f35c0ac0adb5cdec8dfdba407e2ad42172121e Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 2 Jul 2011 23:43:13 +0530 Subject: Reversing the changes done in c278a2c while still resolving #1857. The changes broke bulk migration tests and were fixed in 4d256bc6; however that brought back the issue of #1857 and so this commit goes back to the original scenario and just adds change_table to the list of methods which are to be recorded in the CommandRecorder. The method_missing now delegates all calls to the underlying connection as before. --- activerecord/test/cases/migration/command_recorder_test.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index 85d38fac25..36007255fa 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -14,11 +14,9 @@ module ActiveRecord assert recorder.respond_to?(:america) end - 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 + def test_send_calls_super + assert_raises(NoMethodError) do + @recorder.send(:non_existing_method, :horses) end end -- cgit v1.2.3