spec/rubocop/cop/rspec/nested_groups_spec.rb in rubocop-rspec-1.12.0 vs spec/rubocop/cop/rspec/nested_groups_spec.rb in rubocop-rspec-1.13.0
- old
+ new
@@ -1,17 +1,17 @@
# frozen_string_literal: true
-describe RuboCop::Cop::RSpec::NestedGroups, :config do
+RSpec.describe RuboCop::Cop::RSpec::NestedGroups, :config do
subject(:cop) { described_class.new(config) }
it 'flags nested contexts' do
expect_violation(<<-RUBY)
describe MyClass do
context 'when foo' do
context 'when bar' do
context 'when baz' do
- ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
+ ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded [4/3].
end
end
end
context 'when qux' do
@@ -39,12 +39,12 @@
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
+ ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded [3/2].
context 'when baz' do
- ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
+ ^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded [4/2].
end
end
end
end
RUBY