spec/rubocop/cop/rspec/file_path_spec.rb in rubocop-rspec-1.7.0 vs spec/rubocop/cop/rspec/file_path_spec.rb in rubocop-rspec-1.8.0

- old
+ new

@@ -114,12 +114,12 @@ end it 'handles alphanumeric class names' do inspect_source( cop, - 'describe IPv4AndIPv6 do; end', - 'i_pv4_and_i_pv6_spec.rb' + 'describe IPV4AndIPV6 do; end', + 'ipv4_and_ipv6_spec.rb' ) expect(cop.offenses).to be_empty end it 'checks instance methods' do @@ -210,11 +210,11 @@ 'my_little_class/spaceship_operator_spec.rb' ) expect(cop.offenses).to be_empty end - context 'when configured' do + context 'when configured with CustomTransform' do let(:cop_config) { { 'CustomTransform' => { 'FooFoo' => 'foofoo' } } } it 'respects custom module name transformation' do inspect_source( cop, @@ -227,9 +227,22 @@ it 'ignores routing specs' do inspect_source( cop, 'describe MyController, "#foo", type: :routing do; end', 'foofoo/some/class/bar_spec.rb' + ) + expect(cop.offenses).to be_empty + end + end + + context 'when configured with IgnoreMethods' do + let(:cop_config) { { 'IgnoreMethods' => true } } + + it 'does not care about the described method' do + inspect_source( + cop, + "describe MyClass, '#look_here_a_method' do; end", + 'my_class_spec.rb' ) expect(cop.offenses).to be_empty end end end