Skip to content

Commit c886a46

Browse files
committed
Raise on deprecations inside sandbox
Alternatively, we can set sandbox_config.deprecation_stream = real_deprecation_stream but this seems unnecessary.
1 parent 795f54f commit c886a46

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/spec_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def self.run_all(reporter = nil)
7777
# world, current example) reset. This is used to test specs with RSpec.
7878
config.around(:example, :with_isolated_config) do |example|
7979
RSpec::Core::Sandbox.sandboxed do |sandbox_config|
80+
sandbox_config.raise_errors_for_deprecations! # Otherwise, deprecations are swallowed
81+
8082
# If there is an example-within-an-example, we want to make sure the inner
8183
# example does not get a reference to the outer example (the real spec) if
8284
# it calls something like `pending`.

0 commit comments

Comments
 (0)