diff options
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/dev_rake_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/tasks/dev_rake_spec.rb b/spec/tasks/dev_rake_spec.rb index af7bd4bdf0b..73b1604aa10 100644 --- a/spec/tasks/dev_rake_spec.rb +++ b/spec/tasks/dev_rake_spec.rb @@ -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) } |