spec/rubocop/cop/rspec/nested_groups_spec.rb in rubocop-rspec-1.9.0 vs spec/rubocop/cop/rspec/nested_groups_spec.rb in rubocop-rspec-1.9.1

- old
+ new

@@ -6,20 +6,18 @@ it 'flags nested contexts' do expect_violation(<<-RUBY) describe MyClass do context 'when foo' do context 'when bar' do - ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded context 'when baz' do ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded end end end context 'when qux' do context 'when norf' do - ^^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded end end end RUBY end @@ -33,17 +31,18 @@ end end RUBY end - context 'when MaxNesting is configured as 3' do - let(:cop_config) { { 'MaxNesting' => '3' } } + context 'when MaxNesting is configured as 2' do + let(:cop_config) { { 'MaxNesting' => '2' } } - it 'only flags third level of nesting' do + it 'flags two levels of nesting' do expect_violation(<<-RUBY) describe MyClass do context 'when foo' do context 'when bar' do + ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded context 'when baz' do ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded end end end