diff --git a/spec/rubocop/cop/rspec/context_method_spec.rb b/spec/rubocop/cop/rspec/context_method_spec.rb index fae76377f..3c6b3cca3 100644 --- a/spec/rubocop/cop/rspec/context_method_spec.rb +++ b/spec/rubocop/cop/rspec/context_method_spec.rb @@ -11,6 +11,13 @@ RUBY end + it 'ignores context without `.` or `#` at the beginning' do + expect_no_offenses(<<-RUBY) + context '_foo_bar' do + end + RUBY + end + it 'flags context with `.` at the beginning' do expect_offense(<<-RUBY) context '.foo_bar' do