Method: Rails::Generators::Testing::Assertions#assert_no_migration

Defined in:
railties/lib/rails/generators/testing/assertions.rb

#assert_no_migration(relative) ⇒ Object

Asserts a given migration does not exist. You need to supply an absolute path or a path relative to the configured destination:

assert_no_migration "db/migrate/create_products.rb"
[View source]

72
73
74
75
# File 'railties/lib/rails/generators/testing/assertions.rb', line 72

def assert_no_migration(relative)
  file_name = migration_file_name(relative)
  assert_nil file_name, "Expected migration #{relative} to not exist, but found #{file_name}"
end