diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d9e4eef338..12d9ced593 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -52,7 +52,8 @@ def self.run_all(reporter = nil) config.order = :random Kernel.srand config.seed - config.shared_context_metadata_behavior = :apply_to_host_groups + # shared_context_metadata_behavior is removed in RSpec 4 + config.shared_context_metadata_behavior = :apply_to_host_groups if config.respond_to?(:shared_context_metadata_behavior=) # Zero monkey patching mode is the default and only mode in RSpec 4 config.disable_monkey_patching! if config.respond_to?(:disable_monkey_patching!)