Skip to content
Snippets Groups Projects
Commit 56d24bcf authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Migrate down before each migration unit test

`migrate!` helper triggers a migration that is under the test, so we
need to revert it before each subsequent example. This means that we
need to place it in `before(:each, :migration)` hook.

We still want to migrate everything up *after* each *context*, so in
otherwords we need to place migrate up helper in `before(:context,
:migration)`.
parent d90b0f8c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -132,7 +132,7 @@ RSpec.configure do |config|
Sidekiq.redis(&:flushall)
end
 
config.before(:context, :migration) do
config.before(:each, :migration) do
schema_migrate_down!
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment