spec/rubocop/cop/rspec/nested_groups_spec.rb in rubocop-rspec-1.15.1 vs spec/rubocop/cop/rspec/nested_groups_spec.rb in rubocop-rspec-1.16.0

- old
+ new

@@ -2,11 +2,11 @@ RSpec.describe RuboCop::Cop::RSpec::NestedGroups, :config do subject(:cop) { described_class.new(config) } it 'flags nested contexts' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) describe MyClass do context 'when foo' do context 'when bar' do context 'when baz' do ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded [4/3]. @@ -21,11 +21,11 @@ end RUBY end it 'ignores non-spec context methods' do - expect_no_violations(<<-RUBY) + expect_no_offenses(<<-RUBY) class MyThingy context 'this is not rspec' do context 'but it uses contexts' do end end @@ -35,10 +35,10 @@ context 'when Max is configured as 2' do let(:cop_config) { { 'Max' => '2' } } it 'flags two levels of nesting' do - expect_violation(<<-RUBY) + expect_offense(<<-RUBY) describe MyClass do context 'when foo' do context 'when bar' do ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded [3/2]. context 'when baz' do