Commit 7bf6a79c authored by Thong Kuah's avatar Thong Kuah

Fix order-dependent failure

spec/tasks/dev_rake_spec.rb spec/tasks/gitlab/setup_rake_spec.rb

The latter spec fails because the former spec does not reset the env
var.
parent 26bc5803
......@@ -12,6 +12,15 @@ RSpec.describe 'dev rake tasks' do
end
describe 'setup' do
around do |example|
old_force_value = ENV['force']
# setup rake task sets the force env var, so reset it
example.run
ENV['force'] = old_force_value # rubocop:disable RSpec/EnvAssignment
end
subject(:setup_task) { run_rake_task('dev:setup') }
let(:connections) { Gitlab::Database.database_base_models.values.map(&:connection) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment