Skip to content

Commit 1478bdc

Browse files
committed
Fix RSpec 4 shared context inclusion
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
1 parent 38850b1 commit 1478bdc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/spec_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ module SpecHelper
3838
config.raise_on_warning = true
3939

4040
config.include(ExpectOffense)
41+
42+
config.include_context 'with default RSpec/Language config', :config
43+
config.include_context 'config', :config
44+
config.include_context 'smoke test', type: :cop_spec
4145
end
4246

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

0 commit comments

Comments
 (0)