File tree Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Expand file tree Collapse file tree 4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ If you have created a new cop:
1515
1616* [ ] Added the new cop to ` config/default.yml ` .
1717* [ ] The cop is configured as ` Enabled: pending ` in ` config/default.yml ` .
18+ * [ ] The cop is configured as ` Enabled: true ` in ` .rubocop.yml ` .
1819* [ ] The cop documents examples of good and bad code.
1920* [ ] The tests assert both that bad code is reported and that good code is not reported.
2021* [ ] Set ` VersionAdded ` in ` default/config.yml ` to the next minor version.
Original file line number Diff line number Diff line change @@ -84,3 +84,26 @@ RSpec/DescribeClass:
8484Style/FormatStringToken :
8585 Exclude :
8686 - spec/rubocop/**/*.rb
87+
88+ # Enable our own pending cops.
89+
90+ RSpec/BeEq :
91+ Enabled : true
92+ RSpec/BeNil :
93+ Enabled : true
94+ RSpec/ChangeByZero :
95+ Enabled : true
96+ RSpec/ExcessiveDocstringSpacing :
97+ Enabled : true
98+ RSpec/IdenticalEqualityAssertion :
99+ Enabled : true
100+ RSpec/SubjectDeclaration :
101+ Enabled : true
102+ RSpec/VerifiedDoubleReference :
103+ Enabled : true
104+ RSpec/Capybara/SpecificMatcher :
105+ Enabled : true
106+ RSpec/FactoryBot/SyntaxMethods :
107+ Enabled : true
108+ RSpec/Rails/AvoidSetupHook :
109+ Enabled : true
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33RSpec . describe RuboCop ::Cop ::RSpec ::ScatteredLet do
4- it 'flags `let` after the first different node ' do
4+ it 'flags `let` after the first different node' do
55 expect_offense ( <<-RUBY )
66 RSpec.describe User do
77 let(:a) { a }
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def example(source)
3939 end
4040
4141 it 'returns nil for examples without doc strings' do
42- expect ( example ( 'it { foo }' ) . doc_string ) . to be ( nil )
42+ expect ( example ( 'it { foo }' ) . doc_string ) . to be_nil
4343 end
4444
4545 it 'extracts keywords' do
@@ -58,12 +58,14 @@ def example(source)
5858 end
5959
6060 describe 'value object semantics' do
61+ # rubocop:disable RSpec/IdenticalEqualityAssertion
6162 it 'compares by value' do
6263 aggregate_failures 'equality semantics' do
6364 expect ( example ( 'it("foo")' ) ) . to eq ( example ( 'it("foo")' ) )
6465 expect ( example ( 'it("foo")' ) ) . not_to eq ( example ( 'it("bar")' ) )
6566 end
6667 end
68+ # rubocop:enable RSpec/IdenticalEqualityAssertion
6769
6870 it 'can be used as a key in a hash' do
6971 hash = { }
You can’t perform that action at this time.
0 commit comments