diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-18 15:09:25 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-19 10:24:15 -0800 |
commit | b29a24bb6f13b8af9c12b77ee0ddc1f84c79ab55 (patch) | |
tree | e4e336cd196966fa2c14c1f0b3829ac5a1a05485 /activerecord/test/cases | |
parent | 5d93900dc6a423fe8d7b0c6e330deeaca4b8b72c (diff) | |
download | rails-b29a24bb6f13b8af9c12b77ee0ddc1f84c79ab55.tar.gz rails-b29a24bb6f13b8af9c12b77ee0ddc1f84c79ab55.tar.bz2 rails-b29a24bb6f13b8af9c12b77ee0ddc1f84c79ab55.zip |
commands are reversed
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration/command_recorder_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration/command_recorder_test.rb b/activerecord/test/cases/migration/command_recorder_test.rb index c33ce7cadf..47c3332078 100644 --- a/activerecord/test/cases/migration/command_recorder_test.rb +++ b/activerecord/test/cases/migration/command_recorder_test.rb @@ -20,6 +20,13 @@ module ActiveRecord assert_equal 2, @recorder.inverse.length end + def test_inverted_commands_are_reveresed + @recorder.record :create_table, [:hello] + @recorder.record :create_table, [:world] + tables = @recorder.inverse.map(&:last) + assert_equal [[:world], [:hello]], tables + end + def test_invert_create_table @recorder.record :create_table, [:system_settings] drop_table = @recorder.inverse.first |