Skip to content

Commit 7c2010b

Browse files
committed
Reduce sandboxing to prevent swallowed deprecations
We used to sandbox everything, but it turns out that deprecations were swallowed, as the temporary config has no deprecation stream set, or stderr is masked.
1 parent b80f752 commit 7c2010b

20 files changed

+23
-21
lines changed

spec/rspec/rails/configuration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
end
124124
end
125125

126-
describe "#infer_spec_type_from_file_location!" do
126+
describe "#infer_spec_type_from_file_location!", :with_isolated_config do
127127
def in_inferring_type_from_location_environment
128128
in_sub_process do
129129
RSpec.configuration.infer_spec_type_from_file_location!

spec/rspec/rails/example/channel_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "rspec/rails/feature_check"
22

33
module RSpec::Rails
4-
RSpec.describe ChannelExampleGroup do
4+
RSpec.describe ChannelExampleGroup, :with_isolated_config do
55
if RSpec::Rails::FeatureCheck.has_action_cable_testing?
66
it_behaves_like "an rspec-rails example group mixin", :channel,
77
'./spec/channels/', '.\\spec\\channels\\'

spec/rspec/rails/example/controller_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def self.abstract?; false; end
33
end
44

55
module RSpec::Rails
6-
RSpec.describe ControllerExampleGroup do
6+
RSpec.describe ControllerExampleGroup, :with_isolated_config do
77
it_behaves_like "an rspec-rails example group mixin", :controller,
88
'./spec/controllers/', '.\\spec\\controllers\\'
99

spec/rspec/rails/example/feature_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RSpec::Rails
2-
RSpec.describe FeatureExampleGroup do
2+
RSpec.describe FeatureExampleGroup, :with_isolated_config do
33
it_behaves_like "an rspec-rails example group mixin", :feature,
44
'./spec/features/', '.\\spec\\features\\'
55

spec/rspec/rails/example/helper_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RSpec::Rails
2-
RSpec.describe HelperExampleGroup do
2+
RSpec.describe HelperExampleGroup, :with_isolated_config do
33
module ::FoosHelper
44
class InternalClass
55
end

spec/rspec/rails/example/job_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RSpec::Rails
2-
RSpec.describe JobExampleGroup do
2+
RSpec.describe JobExampleGroup, :with_isolated_config do
33
if defined?(ActiveJob)
44
it_behaves_like "an rspec-rails example group mixin", :job,
55
'./spec/jobs/', '.\\spec\\jobs\\'

spec/rspec/rails/example/mailbox_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def receive(*)
1414

1515
module RSpec
1616
module Rails
17-
RSpec.describe MailboxExampleGroup, skip: !RSpec::Rails::FeatureCheck.has_action_mailbox? do
17+
RSpec.describe MailboxExampleGroup, :with_isolated_config, skip: !RSpec::Rails::FeatureCheck.has_action_mailbox? do
1818
it_behaves_like "an rspec-rails example group mixin", :mailbox,
1919
'./spec/mailboxes/', '.\\spec\\mailboxes\\'
2020

spec/rspec/rails/example/mailer_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RSpec::Rails
2-
RSpec.describe MailerExampleGroup do
2+
RSpec.describe MailerExampleGroup, :with_isolated_config do
33
module ::Rails; end
44
before do
55
allow(Rails).to receive_message_chain(:application, :routes, :url_helpers).and_return(Rails)

spec/rspec/rails/example/model_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RSpec::Rails
2-
RSpec.describe ModelExampleGroup do
2+
RSpec.describe ModelExampleGroup, :with_isolated_config do
33
it_behaves_like "an rspec-rails example group mixin", :model,
44
'./spec/models/', '.\\spec\\models\\'
55
end

spec/rspec/rails/example/rails_example_group_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RSpec::Rails
2-
RSpec.describe RailsExampleGroup do
2+
RSpec.describe RailsExampleGroup, :with_isolated_config do
33
it 'supports tagged_logger' do
44
expect(described_class.private_instance_methods).to include(:tagged_logger)
55
end

0 commit comments

Comments
 (0)