Methods
- A
- C
- S
- T
-
- test_inverse,
- test_invert_add_column,
- test_invert_add_index,
- test_invert_add_index_with_name,
- test_invert_add_index_with_no_options,
- test_invert_add_timestamps,
- test_invert_create_table,
- test_invert_create_table_with_options,
- test_invert_remove_timestamps,
- test_invert_rename_column,
- test_invert_rename_index,
- test_invert_rename_table,
- test_inverted_commands_are_reveresed,
- test_record,
- test_respond_to_delegates,
- test_send_calls_super,
- test_send_delegates_to_record,
- test_unknown_commands_delegate,
- test_unknown_commands_raise_exception_if_they_cannot_delegate
Instance Public methods
america()
Link
create_table(name)
Link
setup()
Link
test_inverse()
Link
test_invert_add_column()
Link
test_invert_add_index()
Link
# File activerecord/test/cases/migration/command_recorder_test.rb, line 94 def test_invert_add_index @recorder.record :add_index, [:table, [:one, :two], {:options => true}] remove = @recorder.inverse.first assert_equal [:remove_index, [:table, {:column => [:one, :two]}]], remove end
test_invert_add_index_with_name()
Link
# File activerecord/test/cases/migration/command_recorder_test.rb, line 100 def test_invert_add_index_with_name @recorder.record :add_index, [:table, [:one, :two], {:name => "new_index"}] remove = @recorder.inverse.first assert_equal [:remove_index, [:table, {:name => "new_index"}]], remove end
test_invert_add_index_with_no_options()
Link
# File activerecord/test/cases/migration/command_recorder_test.rb, line 106 def test_invert_add_index_with_no_options @recorder.record :add_index, [:table, [:one, :two]] remove = @recorder.inverse.first assert_equal [:remove_index, [:table, {:column => [:one, :two]}]], remove end
test_invert_add_timestamps()
Link
test_invert_create_table()
Link
test_invert_create_table_with_options()
Link
# File activerecord/test/cases/migration/command_recorder_test.rb, line 70 def test_invert_create_table_with_options @recorder.record :create_table, [:people_reminders, {:id => false}] drop_table = @recorder.inverse.first assert_equal [:drop_table, [:people_reminders]], drop_table end
test_invert_remove_timestamps()
Link
test_invert_rename_column()
Link
test_invert_rename_index()
Link
test_invert_rename_table()
Link
test_inverted_commands_are_reveresed()
Link
# File activerecord/test/cases/migration/command_recorder_test.rb, line 57 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
test_record()
Link
test_respond_to_delegates()
Link
test_send_calls_super()
Link
test_send_delegates_to_record()
Link
# File activerecord/test/cases/migration/command_recorder_test.rb, line 23 def test_send_delegates_to_record recorder = CommandRecorder.new(Class.new { def create_table(name); end }.new) assert recorder.respond_to?(:create_table), 'respond_to? create_table' recorder.send(:create_table, :horses) assert_equal [[:create_table, [:horses]]], recorder.commands end
test_unknown_commands_delegate()
Link
test_unknown_commands_raise_exception_if_they_cannot_delegate()
Link