assert_migration

assert_migration(relative, *contents, &block)
Instance Public methods

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

1
assert_migration "db/migrate/create_products.rb"

This method manipulates the given path and tries to find any migration which matches the migration name. For example, the call above is converted to:

1
assert_file "db/migrate/003_create_products.rb"

Consequently, #assert_migration accepts the same arguments has assert_file.

doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.