diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-06-30 00:47:35 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-06-30 00:47:35 +0100 |
commit | 4d256bc6b1e6ae62c78d0ff3ca17480a53e00436 (patch) | |
tree | 7314d625e609e4bfad30276c81c14e318b2ad29a /activerecord/test/cases/migration/command_recorder_test.rb | |
parent | b4d8c7d148c6b44eea6701687ca2a97df9088747 (diff) | |
download | rails-4d256bc6b1e6ae62c78d0ff3ca17480a53e00436.tar.gz rails-4d256bc6b1e6ae62c78d0ff3ca17480a53e00436.tar.bz2 rails-4d256bc6b1e6ae62c78d0ff3ca17480a53e00436.zip |
CommandRecorder should delegate in method_missing where possible. Fixes some tests in migration_test.rb under mysql. The problem was introduced in c278a2c5e109204ec8a47fcbfdfc327aad7996ce.
Diffstat (limited to 'activerecord/test/cases/migration/command_recorder_test.rb')
-rw-r--r-- | activerecord/test/cases/migration/command_recorder_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index a03c80bf93..85d38fac25 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -31,7 +31,12 @@ module ActiveRecord assert_equal [[:create_table, [:horses]]], recorder.commands end - def test_unknown_commands_raise_exception + def test_unknown_commands_delegate + recorder = CommandRecorder.new(stub(:foo => 'bar')) + assert_equal 'bar', recorder.foo + end + + def test_unknown_commands_raise_exception_if_they_cannot_delegate @recorder.record :execute, ['some sql'] assert_raises(ActiveRecord::IrreversibleMigration) do @recorder.inverse |