Skip to content

Commit

Permalink
Configure rspec shared_context_metadata_behavior to :apply_to_host_gr…
Browse files Browse the repository at this point in the history
…oups (compatibility for rspec 4)
  • Loading branch information
rrosenblum-splunk authored and bbatsov committed Apr 4, 2021
1 parent 50dc01e commit c8c3358
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f }

RSpec.configure do |config|
# This config option will be enabled by default on RSpec 4,
# but for reasons of backwards compatibility, you have to
# set it on RSpec 3.
#
# It causes the host group and examples to inherit metadata
# from the shared context.
config.shared_context_metadata_behavior = :apply_to_host_groups

# These two settings work together to allow you to limit a spec run
# to individual examples or groups you care about by tagging them with
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
Expand Down

0 comments on commit c8c3358

Please sign in to comment.