lib/rubocop/cop/rspec/repeated_include_example.rb in rubocop-rspec-2.12.1 vs lib/rubocop/cop/rspec/repeated_include_example.rb in rubocop-rspec-2.13.0
- old
+ new
@@ -4,48 +4,47 @@
module Cop
module RSpec
# Check for repeated include of shared examples.
#
# @example
+ # # bad
+ # describe 'foo' do
+ # include_examples 'cool stuff'
+ # include_examples 'cool stuff'
+ # end
#
- # # bad
- # describe 'foo' do
- # include_examples 'cool stuff'
- # include_examples 'cool stuff'
- # end
+ # # bad
+ # describe 'foo' do
+ # it_behaves_like 'a cool', 'thing'
+ # it_behaves_like 'a cool', 'thing'
+ # end
#
- # # bad
- # describe 'foo' do
- # it_behaves_like 'a cool', 'thing'
- # it_behaves_like 'a cool', 'thing'
- # end
+ # # bad
+ # context 'foo' do
+ # it_should_behave_like 'a duck'
+ # it_should_behave_like 'a duck'
+ # end
#
- # # bad
- # context 'foo' do
- # it_should_behave_like 'a duck'
- # it_should_behave_like 'a duck'
- # end
+ # # good
+ # describe 'foo' do
+ # include_examples 'cool stuff'
+ # end
#
- # # good
- # describe 'foo' do
- # include_examples 'cool stuff'
- # end
+ # describe 'bar' do
+ # include_examples 'cool stuff'
+ # end
#
- # describe 'bar' do
- # include_examples 'cool stuff'
- # end
+ # # good
+ # describe 'foo' do
+ # it_behaves_like 'a cool', 'thing'
+ # it_behaves_like 'a cool', 'person'
+ # end
#
- # # good
- # describe 'foo' do
- # it_behaves_like 'a cool', 'thing'
- # it_behaves_like 'a cool', 'person'
- # end
- #
- # # good
- # context 'foo' do
- # it_should_behave_like 'a duck'
- # it_should_behave_like 'a goose'
- # end
+ # # good
+ # context 'foo' do
+ # it_should_behave_like 'a duck'
+ # it_should_behave_like 'a goose'
+ # end
#
class RepeatedIncludeExample < Base
MSG = 'Repeated include of shared_examples %<name>s ' \
'on line(s) %<repeat>s'