Skip to content

Commit

Permalink
Add deregister in before(:all)``
Browse files Browse the repository at this point in the history
  • Loading branch information
ericproulx committed Dec 15, 2024
1 parent 8aee8f9 commit 6790e4d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@
# so it should be set to true here as well to reflect that.
I18n.enforce_available_locales = true

Grape::Util::Registry.include(Deregister)


RSpec.configure do |config|
config.include Rack::Test::Methods
config.include Spec::Support::Helpers
config.raise_errors_for_deprecations!
config.filter_run_when_matching :focus

config.before(:all) { Grape::Util::InheritableSetting.reset_global! }
config.before(:all) do
Grape::Util::InheritableSetting.reset_global!
Grape::Util::Registry.include(Deregister)
end
config.before { Grape::Util::InheritableSetting.reset_global! }

# Enable flags like --only-failures and --next-failure
Expand Down

0 comments on commit 6790e4d

Please sign in to comment.