rubocop-rspec 1.27.0 → 1.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +1 -1
- data/config/default.yml +15 -10
- data/lib/rubocop/cop/rspec/describe_method.rb +1 -1
- data/lib/rubocop/cop/rspec/empty_example_group.rb +1 -1
- data/lib/rubocop/cop/rspec/empty_line_after_example_group.rb +2 -4
- data/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +1 -3
- data/lib/rubocop/cop/rspec/empty_line_after_hook.rb +1 -3
- data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +1 -3
- data/lib/rubocop/cop/rspec/example_without_description.rb +3 -4
- data/lib/rubocop/cop/rspec/expect_in_hook.rb +8 -23
- data/lib/rubocop/cop/rspec/expect_output.rb +0 -2
- data/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +146 -0
- data/lib/rubocop/cop/rspec/instance_spy.rb +0 -2
- data/lib/rubocop/cop/rspec/iterated_expectation.rb +1 -1
- data/lib/rubocop/cop/rspec/leading_subject.rb +1 -6
- data/lib/rubocop/cop/rspec/let_before_examples.rb +0 -2
- data/lib/rubocop/cop/rspec/missing_example_group_argument.rb +35 -0
- data/lib/rubocop/cop/rspec/multiple_expectations.rb +1 -1
- data/lib/rubocop/cop/rspec/multiple_subjects.rb +4 -4
- data/lib/rubocop/cop/rspec/nested_groups.rb +1 -1
- data/lib/rubocop/cop/rspec/pending.rb +1 -1
- data/lib/rubocop/cop/rspec/receive_never.rb +43 -0
- data/lib/rubocop/cop/rspec/scattered_let.rb +0 -2
- data/lib/rubocop/cop/rspec/shared_context.rb +3 -3
- data/lib/rubocop/cop/rspec/void_expect.rb +1 -1
- data/lib/rubocop/cop/rspec_cops.rb +4 -3
- data/lib/rubocop/rspec/align_let_brace.rb +1 -3
- data/lib/rubocop/rspec/blank_line_separation.rb +6 -0
- data/lib/rubocop/rspec/example_group.rb +0 -7
- data/lib/rubocop/rspec/language/node_pattern.rb +6 -0
- data/lib/rubocop/rspec/version.rb +1 -1
- data/rubocop-rspec.gemspec +2 -2
- data/spec/project/project_requires_spec.rb +13 -3
- data/spec/rubocop/cop/rspec/before_after_all_spec.rb +2 -2
- data/spec/rubocop/cop/rspec/empty_line_after_example_group_spec.rb +15 -0
- data/spec/rubocop/cop/rspec/factory_bot/attribute_defined_statically_spec.rb +156 -0
- data/spec/rubocop/cop/rspec/let_before_examples_spec.rb +0 -5
- data/spec/rubocop/cop/rspec/missing_example_group_argument_spec.rb +55 -0
- data/spec/rubocop/cop/rspec/overwriting_setup_spec.rb +0 -5
- data/spec/rubocop/cop/rspec/receive_never_spec.rb +45 -0
- data/spec/rubocop/cop/rspec/scattered_let_spec.rb +0 -5
- data/spec/shared/smoke_test_examples.rb +25 -0
- data/spec/smoke_tests/empty_spec.rb +0 -0
- data/spec/smoke_tests/factory_bot_spec.rb +11 -0
- data/spec/smoke_tests/no_tests_spec.rb +4 -0
- data/spec/smoke_tests/weird_rspec_spec.rb +233 -0
- data/spec/spec_helper.rb +4 -0
- metadata +24 -11
- data/lib/rubocop/cop/rspec/factory_bot/dynamic_attribute_defined_statically.rb +0 -93
- data/lib/rubocop/cop/rspec/factory_bot/static_attribute_defined_dynamically.rb +0 -81
- data/spec/rubocop/cop/rspec/factory_bot/dynamic_attribute_defined_statically_spec.rb +0 -139
- data/spec/rubocop/cop/rspec/factory_bot/static_attribute_defined_dynamically_spec.rb +0 -107
@@ -86,11 +86,6 @@ RSpec.describe RuboCop::Cop::RSpec::LetBeforeExamples do
|
|
86
86
|
RUBY
|
87
87
|
end
|
88
88
|
|
89
|
-
it 'does not encounter an error when handling an empty describe' do
|
90
|
-
expect { inspect_source('RSpec.describe(User) do end', 'a_spec.rb') }
|
91
|
-
.not_to raise_error
|
92
|
-
end
|
93
|
-
|
94
89
|
bad_code = <<-RUBY
|
95
90
|
RSpec.describe User do
|
96
91
|
include_examples('should be after let')
|
@@ -0,0 +1,55 @@
|
|
1
|
+
RSpec.describe RuboCop::Cop::RSpec::MissingExampleGroupArgument do
|
2
|
+
subject(:cop) { described_class.new }
|
3
|
+
|
4
|
+
it 'accepts describe with an argument' do
|
5
|
+
expect_no_offenses(<<-RUBY)
|
6
|
+
describe FooClass do
|
7
|
+
end
|
8
|
+
|
9
|
+
RSpec.describe FooClass do
|
10
|
+
end
|
11
|
+
RUBY
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'accepts methods with a name like an example block' do
|
15
|
+
expect_no_offenses(<<-RUBY)
|
16
|
+
Scenario.context do
|
17
|
+
'static'
|
18
|
+
end
|
19
|
+
RUBY
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'checks first argument of describe' do
|
23
|
+
expect_offense(<<-RUBY)
|
24
|
+
describe do
|
25
|
+
^^^^^^^^^^^ The first argument to `describe` should not be empty.
|
26
|
+
end
|
27
|
+
|
28
|
+
RSpec.describe do
|
29
|
+
^^^^^^^^^^^^^^^^^ The first argument to `describe` should not be empty.
|
30
|
+
end
|
31
|
+
RUBY
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'checks first argument of nested describe' do
|
35
|
+
expect_offense(<<-RUBY)
|
36
|
+
describe FooClass do
|
37
|
+
describe do
|
38
|
+
^^^^^^^^^^^ The first argument to `describe` should not be empty.
|
39
|
+
end
|
40
|
+
|
41
|
+
RSpec.describe do
|
42
|
+
^^^^^^^^^^^^^^^^^ The first argument to `describe` should not be empty.
|
43
|
+
end
|
44
|
+
end
|
45
|
+
RUBY
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'checks first argument of context' do
|
49
|
+
expect_offense(<<-RUBY)
|
50
|
+
context do
|
51
|
+
^^^^^^^^^^ The first argument to `context` should not be empty.
|
52
|
+
end
|
53
|
+
RUBY
|
54
|
+
end
|
55
|
+
end
|
@@ -86,9 +86,4 @@ RSpec.describe RuboCop::Cop::RSpec::OverwritingSetup do
|
|
86
86
|
end
|
87
87
|
RUBY
|
88
88
|
end
|
89
|
-
|
90
|
-
it 'does not encounter an error when handling an empty describe' do
|
91
|
-
expect { inspect_source('RSpec.describe(User) do end', 'a_spec.rb') }
|
92
|
-
.not_to raise_error
|
93
|
-
end
|
94
89
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe RuboCop::Cop::RSpec::ReceiveNever do
|
4
|
+
subject(:cop) { described_class.new }
|
5
|
+
|
6
|
+
it 'flags usage of `never`' do
|
7
|
+
expect_offense(<<-RUBY)
|
8
|
+
expect(foo).to receive(:bar).never
|
9
|
+
^^^^^ Use `not_to receive` instead of `never`.
|
10
|
+
RUBY
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'flags usage of `never` after `with`' do
|
14
|
+
expect_offense(<<-RUBY)
|
15
|
+
expect(foo).to receive(:bar).with(baz).never
|
16
|
+
^^^^^ Use `not_to receive` instead of `never`.
|
17
|
+
RUBY
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'flags usage of `never` with `is_expected`' do
|
21
|
+
expect_offense(<<-RUBY)
|
22
|
+
is_expected.to receive(:bar).with(baz).never
|
23
|
+
^^^^^ Use `not_to receive` instead of `never`.
|
24
|
+
RUBY
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'flags usage of `never` with `expect_any_instance_of`' do
|
28
|
+
expect_offense(<<-RUBY)
|
29
|
+
expect_any_instance_of(Foo).to receive(:bar).with(baz).never
|
30
|
+
^^^^^ Use `not_to receive` instead of `never`.
|
31
|
+
RUBY
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'allows method called `never`' do
|
35
|
+
expect_no_offenses(<<-RUBY)
|
36
|
+
expect(foo).to receive(:bar).with(Value.never)
|
37
|
+
expect(foo.never).to eq(bar.never)
|
38
|
+
is_expected.to be never
|
39
|
+
RUBY
|
40
|
+
end
|
41
|
+
|
42
|
+
include_examples 'autocorrect',
|
43
|
+
'expect(foo).to receive(:bar).with(0).never',
|
44
|
+
'expect(foo).not_to receive(:bar).with(0)'
|
45
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
RSpec.shared_examples 'smoke test', type: :cop_spec do
|
2
|
+
context 'with default configuration' do
|
3
|
+
# This is overridden to avoid a number of specs that define `cop_config`
|
4
|
+
# (so it is referenced in the 'config' shared context) but do not define
|
5
|
+
# all of the dependent configuration options until inside of a context
|
6
|
+
# that is out of scope, causing a NameError.
|
7
|
+
let(:cop_config) { {} }
|
8
|
+
|
9
|
+
stress_tests = Pathname.glob('spec/smoke_tests/*.rb')
|
10
|
+
|
11
|
+
raise 'No smoke tests could be found!' if stress_tests.empty?
|
12
|
+
|
13
|
+
stress_tests.each do |path|
|
14
|
+
it "does not crash on smoke test: #{path}" do
|
15
|
+
source = path.read
|
16
|
+
file_name = path.to_s
|
17
|
+
|
18
|
+
aggregate_failures do
|
19
|
+
expect { inspect_source(source, file_name) }.not_to raise_error
|
20
|
+
expect { autocorrect_source(source, file_name) }.not_to raise_error
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
File without changes
|
@@ -0,0 +1,233 @@
|
|
1
|
+
RSpec.describe 'Weirdness' do
|
2
|
+
subject! { nil }
|
3
|
+
subject { nil }
|
4
|
+
subject(:foo) { nil }
|
5
|
+
subject!(:foo) { nil }
|
6
|
+
|
7
|
+
subject! (:foo) { |something| nil }
|
8
|
+
subject :foo do end
|
9
|
+
|
10
|
+
let(:foo) { |something| something }
|
11
|
+
let (:foo) { 1 }
|
12
|
+
let! (:bar){}
|
13
|
+
|
14
|
+
let :a do end
|
15
|
+
|
16
|
+
let(:bar) { <<-HEREDOC }
|
17
|
+
What a pain.
|
18
|
+
HEREDOC
|
19
|
+
|
20
|
+
let(:bar) { <<-'HEREDOC' }
|
21
|
+
Even odder.
|
22
|
+
HEREDOC
|
23
|
+
|
24
|
+
let(:baz) do
|
25
|
+
<<-INSIDE
|
26
|
+
Hi. I'm in your lets.
|
27
|
+
INSIDE
|
28
|
+
end
|
29
|
+
|
30
|
+
let(:hi) {}
|
31
|
+
let(:bye) do
|
32
|
+
end
|
33
|
+
|
34
|
+
let(:doop) { foo; 1 }
|
35
|
+
|
36
|
+
it {}
|
37
|
+
specify {}
|
38
|
+
|
39
|
+
it 'works', metadata: true do
|
40
|
+
end
|
41
|
+
|
42
|
+
describe {}
|
43
|
+
context {}
|
44
|
+
|
45
|
+
describe '#nothing' do
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'is empty' do
|
49
|
+
end
|
50
|
+
|
51
|
+
it '' do end
|
52
|
+
describe do end
|
53
|
+
context do end
|
54
|
+
shared_examples 'a' do end
|
55
|
+
|
56
|
+
describe 'things' do
|
57
|
+
context 'with context' do
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
shared_examples 'weird rspec' do
|
62
|
+
end
|
63
|
+
|
64
|
+
shared_examples :something do
|
65
|
+
end
|
66
|
+
|
67
|
+
context 'test' do
|
68
|
+
include_examples 'weird rspec'
|
69
|
+
include_examples('weird rspec', serious: true) do
|
70
|
+
it_behaves_like :something
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
it_behaves_like :something
|
75
|
+
it_should_behave_like :something
|
76
|
+
|
77
|
+
it_behaves_like :something do
|
78
|
+
let(:foo) { 'bar' }
|
79
|
+
end
|
80
|
+
|
81
|
+
it_behaves_like(:something) do |arg, *args, &block|
|
82
|
+
end
|
83
|
+
|
84
|
+
before {}
|
85
|
+
context 'never run' do
|
86
|
+
around {}
|
87
|
+
end
|
88
|
+
after {}
|
89
|
+
|
90
|
+
before { <<-DOC }
|
91
|
+
Eh, what's up?
|
92
|
+
DOC
|
93
|
+
|
94
|
+
around { |test| test.run; <<-DOC }
|
95
|
+
Eh, what's up?
|
96
|
+
DOC
|
97
|
+
|
98
|
+
after { <<-DOC }
|
99
|
+
Eh, what's up?
|
100
|
+
DOC
|
101
|
+
|
102
|
+
around do |test|
|
103
|
+
test.run
|
104
|
+
end
|
105
|
+
|
106
|
+
it 'is expecting you' do
|
107
|
+
expect('you').to eql('you')
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'is expecting you not to raise an error' do
|
111
|
+
expect { 'you' }.not_to raise_error
|
112
|
+
end
|
113
|
+
|
114
|
+
it 'has chained expectations' do
|
115
|
+
expect('you').to eql('you').and(match(/y/))
|
116
|
+
end
|
117
|
+
|
118
|
+
%w[who likes dynamic examples].each do |word|
|
119
|
+
let(word) { word }
|
120
|
+
|
121
|
+
describe "#{word}" do
|
122
|
+
context "#{word}" do
|
123
|
+
it "lets the word '#{word}' be '#{word}'" do
|
124
|
+
expect(send(word)).to eql(word)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
it { foo; 1 && 2}
|
131
|
+
it('has a description too') { foo; 1 && 2}
|
132
|
+
|
133
|
+
it %{quotes a string weird} do
|
134
|
+
end
|
135
|
+
|
136
|
+
it((' '.strip! ; 1 && 'isnt a simple string')) do
|
137
|
+
expect(nil).to be(nil)
|
138
|
+
end
|
139
|
+
|
140
|
+
it((' '.strip! ; 1 && 'isnt a simple string')) do
|
141
|
+
double = double(:foo)
|
142
|
+
|
143
|
+
allow(double).to receive(:oogabooga).with(nil).and_return(nil)
|
144
|
+
|
145
|
+
expect(double.oogabooga(nil)).to be(nil)
|
146
|
+
|
147
|
+
expect(double).to have_received(:oogabooga).once
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'uses a matcher' do
|
151
|
+
expect([].empty?).to be(true)
|
152
|
+
expect([]).to be_empty
|
153
|
+
end
|
154
|
+
|
155
|
+
let(:klass) do
|
156
|
+
Class.new do
|
157
|
+
def initialize(thing)
|
158
|
+
@thing = thing
|
159
|
+
end
|
160
|
+
|
161
|
+
def announce
|
162
|
+
'wooo, so dynamic!'
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
it 'it does a thing' do
|
168
|
+
end
|
169
|
+
|
170
|
+
it 'It does a thing' do
|
171
|
+
end
|
172
|
+
|
173
|
+
it 'should not do the thing' do
|
174
|
+
end
|
175
|
+
|
176
|
+
specify do
|
177
|
+
foo = double(:bar)
|
178
|
+
allow(foo).to receive_message_chain(bar: 42, baz: 42)
|
179
|
+
allow(foo).to receive(:bar)
|
180
|
+
allow(foo).to receive_messages(bar: 42, baz: 42)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
RSpec.describe {}
|
185
|
+
RSpec.shared_examples('pointless') {}
|
186
|
+
RSpec.shared_context('even pointless-er') {}
|
187
|
+
RSpec.describe do end
|
188
|
+
RSpec.shared_examples('pointless2') do end
|
189
|
+
RSpec.shared_context('even pointless-er2') do end
|
190
|
+
|
191
|
+
class Broken
|
192
|
+
end
|
193
|
+
|
194
|
+
RSpec.describe Broken do
|
195
|
+
end
|
196
|
+
|
197
|
+
RSpec.describe 'RubocopBug' do
|
198
|
+
subject { true }
|
199
|
+
|
200
|
+
before do
|
201
|
+
each_row = allow(double(:exporter)).to receive(:each_row)
|
202
|
+
|
203
|
+
[1, 2].each do |sig|
|
204
|
+
each_row = each_row.and_yield(sig)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
it 'has a single example' do
|
209
|
+
expect(subject).to be_truthy
|
210
|
+
end
|
211
|
+
|
212
|
+
it 'has an expectation' do
|
213
|
+
stats = double(event: nil)
|
214
|
+
|
215
|
+
stats.event('tada!')
|
216
|
+
|
217
|
+
expect(stats)
|
218
|
+
.to have_received(:event)
|
219
|
+
.with('tada!')
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
RSpec.describe do
|
224
|
+
let(:uh_oh) { <<-HERE.strip + ", #{<<-THERE.strip}" }
|
225
|
+
Seriously
|
226
|
+
HERE
|
227
|
+
who designed these things?
|
228
|
+
THERE
|
229
|
+
|
230
|
+
it 'is insane' do
|
231
|
+
expect(uh_oh).to eql('Seriously, who designed these things?')
|
232
|
+
end
|
233
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -15,6 +15,10 @@ spec_helper_glob = File.expand_path('{support,shared}/*.rb', __dir__)
|
|
15
15
|
Dir.glob(spec_helper_glob).map(&method(:require))
|
16
16
|
|
17
17
|
RSpec.configure do |config|
|
18
|
+
config.define_derived_metadata(file_path: %r{/spec/rubocop/cop/}) do |meta|
|
19
|
+
meta[:type] = :cop_spec
|
20
|
+
end
|
21
|
+
|
18
22
|
config.order = :random
|
19
23
|
|
20
24
|
config.expect_with :rspec do |expectations|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Backus
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-08-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.58.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.
|
28
|
+
version: 0.58.0
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rack
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,9 +143,8 @@ files:
|
|
143
143
|
- lib/rubocop/cop/rspec/expect_change.rb
|
144
144
|
- lib/rubocop/cop/rspec/expect_in_hook.rb
|
145
145
|
- lib/rubocop/cop/rspec/expect_output.rb
|
146
|
+
- lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb
|
146
147
|
- lib/rubocop/cop/rspec/factory_bot/create_list.rb
|
147
|
-
- lib/rubocop/cop/rspec/factory_bot/dynamic_attribute_defined_statically.rb
|
148
|
-
- lib/rubocop/cop/rspec/factory_bot/static_attribute_defined_dynamically.rb
|
149
148
|
- lib/rubocop/cop/rspec/file_path.rb
|
150
149
|
- lib/rubocop/cop/rspec/focus.rb
|
151
150
|
- lib/rubocop/cop/rspec/hook_argument.rb
|
@@ -161,6 +160,7 @@ files:
|
|
161
160
|
- lib/rubocop/cop/rspec/message_chain.rb
|
162
161
|
- lib/rubocop/cop/rspec/message_expectation.rb
|
163
162
|
- lib/rubocop/cop/rspec/message_spies.rb
|
163
|
+
- lib/rubocop/cop/rspec/missing_example_group_argument.rb
|
164
164
|
- lib/rubocop/cop/rspec/multiple_describes.rb
|
165
165
|
- lib/rubocop/cop/rspec/multiple_expectations.rb
|
166
166
|
- lib/rubocop/cop/rspec/multiple_subjects.rb
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/rubocop/cop/rspec/predicate_matcher.rb
|
173
173
|
- lib/rubocop/cop/rspec/rails/http_status.rb
|
174
174
|
- lib/rubocop/cop/rspec/receive_counts.rb
|
175
|
+
- lib/rubocop/cop/rspec/receive_never.rb
|
175
176
|
- lib/rubocop/cop/rspec/repeated_description.rb
|
176
177
|
- lib/rubocop/cop/rspec/repeated_example.rb
|
177
178
|
- lib/rubocop/cop/rspec/return_from_stub.rb
|
@@ -235,9 +236,8 @@ files:
|
|
235
236
|
- spec/rubocop/cop/rspec/expect_change_spec.rb
|
236
237
|
- spec/rubocop/cop/rspec/expect_in_hook_spec.rb
|
237
238
|
- spec/rubocop/cop/rspec/expect_output_spec.rb
|
239
|
+
- spec/rubocop/cop/rspec/factory_bot/attribute_defined_statically_spec.rb
|
238
240
|
- spec/rubocop/cop/rspec/factory_bot/create_list_spec.rb
|
239
|
-
- spec/rubocop/cop/rspec/factory_bot/dynamic_attribute_defined_statically_spec.rb
|
240
|
-
- spec/rubocop/cop/rspec/factory_bot/static_attribute_defined_dynamically_spec.rb
|
241
241
|
- spec/rubocop/cop/rspec/file_path_spec.rb
|
242
242
|
- spec/rubocop/cop/rspec/focus_spec.rb
|
243
243
|
- spec/rubocop/cop/rspec/hook_argument_spec.rb
|
@@ -253,6 +253,7 @@ files:
|
|
253
253
|
- spec/rubocop/cop/rspec/message_chain_spec.rb
|
254
254
|
- spec/rubocop/cop/rspec/message_expectation_spec.rb
|
255
255
|
- spec/rubocop/cop/rspec/message_spies_spec.rb
|
256
|
+
- spec/rubocop/cop/rspec/missing_example_group_argument_spec.rb
|
256
257
|
- spec/rubocop/cop/rspec/multiple_describes_spec.rb
|
257
258
|
- spec/rubocop/cop/rspec/multiple_expectations_spec.rb
|
258
259
|
- spec/rubocop/cop/rspec/multiple_subjects_spec.rb
|
@@ -264,6 +265,7 @@ files:
|
|
264
265
|
- spec/rubocop/cop/rspec/predicate_matcher_spec.rb
|
265
266
|
- spec/rubocop/cop/rspec/rails/http_status_spec.rb
|
266
267
|
- spec/rubocop/cop/rspec/receive_counts_spec.rb
|
268
|
+
- spec/rubocop/cop/rspec/receive_never_spec.rb
|
267
269
|
- spec/rubocop/cop/rspec/repeated_description_spec.rb
|
268
270
|
- spec/rubocop/cop/rspec/repeated_example_spec.rb
|
269
271
|
- spec/rubocop/cop/rspec/return_from_stub_spec.rb
|
@@ -285,6 +287,11 @@ files:
|
|
285
287
|
- spec/rubocop/rspec/wording_spec.rb
|
286
288
|
- spec/shared/autocorrect_behavior.rb
|
287
289
|
- spec/shared/detects_style_behavior.rb
|
290
|
+
- spec/shared/smoke_test_examples.rb
|
291
|
+
- spec/smoke_tests/empty_spec.rb
|
292
|
+
- spec/smoke_tests/factory_bot_spec.rb
|
293
|
+
- spec/smoke_tests/no_tests_spec.rb
|
294
|
+
- spec/smoke_tests/weird_rspec_spec.rb
|
288
295
|
- spec/spec_helper.rb
|
289
296
|
- spec/support/expect_offense.rb
|
290
297
|
homepage: https://github.com/rubocop-hq/rubocop-rspec
|
@@ -301,7 +308,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
301
308
|
requirements:
|
302
309
|
- - ">="
|
303
310
|
- !ruby/object:Gem::Version
|
304
|
-
version: 2.
|
311
|
+
version: 2.2.0
|
305
312
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
306
313
|
requirements:
|
307
314
|
- - ">="
|
@@ -344,9 +351,8 @@ test_files:
|
|
344
351
|
- spec/rubocop/cop/rspec/expect_change_spec.rb
|
345
352
|
- spec/rubocop/cop/rspec/expect_in_hook_spec.rb
|
346
353
|
- spec/rubocop/cop/rspec/expect_output_spec.rb
|
354
|
+
- spec/rubocop/cop/rspec/factory_bot/attribute_defined_statically_spec.rb
|
347
355
|
- spec/rubocop/cop/rspec/factory_bot/create_list_spec.rb
|
348
|
-
- spec/rubocop/cop/rspec/factory_bot/dynamic_attribute_defined_statically_spec.rb
|
349
|
-
- spec/rubocop/cop/rspec/factory_bot/static_attribute_defined_dynamically_spec.rb
|
350
356
|
- spec/rubocop/cop/rspec/file_path_spec.rb
|
351
357
|
- spec/rubocop/cop/rspec/focus_spec.rb
|
352
358
|
- spec/rubocop/cop/rspec/hook_argument_spec.rb
|
@@ -362,6 +368,7 @@ test_files:
|
|
362
368
|
- spec/rubocop/cop/rspec/message_chain_spec.rb
|
363
369
|
- spec/rubocop/cop/rspec/message_expectation_spec.rb
|
364
370
|
- spec/rubocop/cop/rspec/message_spies_spec.rb
|
371
|
+
- spec/rubocop/cop/rspec/missing_example_group_argument_spec.rb
|
365
372
|
- spec/rubocop/cop/rspec/multiple_describes_spec.rb
|
366
373
|
- spec/rubocop/cop/rspec/multiple_expectations_spec.rb
|
367
374
|
- spec/rubocop/cop/rspec/multiple_subjects_spec.rb
|
@@ -373,6 +380,7 @@ test_files:
|
|
373
380
|
- spec/rubocop/cop/rspec/predicate_matcher_spec.rb
|
374
381
|
- spec/rubocop/cop/rspec/rails/http_status_spec.rb
|
375
382
|
- spec/rubocop/cop/rspec/receive_counts_spec.rb
|
383
|
+
- spec/rubocop/cop/rspec/receive_never_spec.rb
|
376
384
|
- spec/rubocop/cop/rspec/repeated_description_spec.rb
|
377
385
|
- spec/rubocop/cop/rspec/repeated_example_spec.rb
|
378
386
|
- spec/rubocop/cop/rspec/return_from_stub_spec.rb
|
@@ -394,5 +402,10 @@ test_files:
|
|
394
402
|
- spec/rubocop/rspec/wording_spec.rb
|
395
403
|
- spec/shared/autocorrect_behavior.rb
|
396
404
|
- spec/shared/detects_style_behavior.rb
|
405
|
+
- spec/shared/smoke_test_examples.rb
|
406
|
+
- spec/smoke_tests/empty_spec.rb
|
407
|
+
- spec/smoke_tests/factory_bot_spec.rb
|
408
|
+
- spec/smoke_tests/no_tests_spec.rb
|
409
|
+
- spec/smoke_tests/weird_rspec_spec.rb
|
397
410
|
- spec/spec_helper.rb
|
398
411
|
- spec/support/expect_offense.rb
|