Skip to content

Commit

Permalink
Fix RSpec 4 shared context inclusion
Browse files Browse the repository at this point in the history
Starting from RSpec 4, the implicit shared context inclusion, when a
shared context would have been included to an example if the example has
matching metadata, is not the case anymore.

See:
 - rspec/rspec-core#2834
 - rspec/rspec-core#2832
 - rspec/rspec-core#2878
  • Loading branch information
pirj committed Jul 10, 2022
1 parent ba26a7d commit e93009a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ module SpecHelper
config.raise_on_warning = true

config.include(ExpectOffense)

config.include_context 'with default RSpec/Language config', :config
config.include_context 'config', :config
config.include_context 'smoke test', type: :cop_spec
end

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
Expand Down

0 comments on commit e93009a

Please sign in to comment.