spec/shared/detects_style_behavior.rb in rubocop-rspec-1.12.0 vs spec/shared/detects_style_behavior.rb in rubocop-rspec-1.13.0
- old
+ new
@@ -1,8 +1,7 @@
-RSpec.shared_examples 'detects style' do |source, detected_style|
+RSpec.shared_examples 'detects style' do |source, style, filename: 'x_spec.rb'|
it 'generates a todo based on the detected style' do
- inspect_source(cop, source, 'foo_spec.rb')
+ inspect_source(cop, source, filename)
- expect(cop.config_to_allow_offenses)
- .to eq('EnforcedStyle' => detected_style)
+ expect(cop.config_to_allow_offenses).to eq('EnforcedStyle' => style)
end
end