rubocop-rspec 1.33.0 → 1.34.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 +16 -2
- data/README.md +10 -2
- data/config/default.yml +6 -1
- data/lib/rubocop/cop/rspec/any_instance.rb +0 -1
- data/lib/rubocop/cop/rspec/around_block.rb +1 -2
- data/lib/rubocop/cop/rspec/before_after_all.rb +0 -1
- data/lib/rubocop/cop/rspec/context_wording.rb +18 -17
- data/lib/rubocop/cop/rspec/describe_class.rb +1 -1
- data/lib/rubocop/cop/rspec/describe_method.rb +1 -1
- data/lib/rubocop/cop/rspec/describe_symbol.rb +1 -1
- data/lib/rubocop/cop/rspec/described_class.rb +79 -13
- data/lib/rubocop/cop/rspec/empty_example_group.rb +1 -1
- data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +1 -1
- data/lib/rubocop/cop/rspec/example_length.rb +1 -1
- data/lib/rubocop/cop/rspec/example_wording.rb +6 -4
- data/lib/rubocop/cop/rspec/expect_actual.rb +1 -1
- data/lib/rubocop/cop/rspec/expect_output.rb +2 -0
- data/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb +1 -1
- data/lib/rubocop/cop/rspec/factory_bot/create_list.rb +1 -2
- data/lib/rubocop/cop/rspec/file_path.rb +0 -1
- data/lib/rubocop/cop/rspec/focus.rb +1 -1
- data/lib/rubocop/cop/rspec/hook_argument.rb +0 -1
- data/lib/rubocop/cop/rspec/instance_spy.rb +1 -1
- data/lib/rubocop/cop/rspec/instance_variable.rb +1 -1
- data/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb +1 -1
- data/lib/rubocop/cop/rspec/it_behaves_like.rb +1 -1
- data/lib/rubocop/cop/rspec/iterated_expectation.rb +1 -1
- data/lib/rubocop/cop/rspec/leading_subject.rb +0 -1
- data/lib/rubocop/cop/rspec/leaky_constant_declaration.rb +128 -0
- data/lib/rubocop/cop/rspec/let_before_examples.rb +1 -1
- data/lib/rubocop/cop/rspec/let_setup.rb +2 -4
- data/lib/rubocop/cop/rspec/missing_example_group_argument.rb +1 -2
- data/lib/rubocop/cop/rspec/multiple_describes.rb +1 -1
- data/lib/rubocop/cop/rspec/multiple_expectations.rb +32 -16
- data/lib/rubocop/cop/rspec/multiple_subjects.rb +1 -1
- data/lib/rubocop/cop/rspec/nested_groups.rb +0 -1
- data/lib/rubocop/cop/rspec/overwriting_setup.rb +0 -1
- data/lib/rubocop/cop/rspec/pending.rb +1 -1
- data/lib/rubocop/cop/rspec/predicate_matcher.rb +0 -3
- data/lib/rubocop/cop/rspec/repeated_description.rb +1 -1
- data/lib/rubocop/cop/rspec/repeated_example.rb +1 -1
- data/lib/rubocop/cop/rspec/scattered_let.rb +1 -1
- data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
- data/lib/rubocop/cop/rspec/shared_context.rb +0 -1
- data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +1 -1
- data/lib/rubocop/cop/rspec/subject_stub.rb +17 -20
- data/lib/rubocop/cop/rspec/unspecified_exception.rb +1 -4
- data/lib/rubocop/cop/rspec/verified_doubles.rb +1 -1
- data/lib/rubocop/cop/rspec/void_expect.rb +1 -1
- data/lib/rubocop/cop/rspec_cops.rb +1 -0
- data/lib/rubocop/rspec/language.rb +1 -1
- data/lib/rubocop/rspec/top_level_describe.rb +0 -4
- data/lib/rubocop/rspec/version.rb +1 -1
- data/spec/rubocop/cop/rspec/cop_spec.rb +3 -3
- data/spec/rubocop/cop/rspec/describe_class_spec.rb +7 -0
- data/spec/rubocop/cop/rspec/described_class_spec.rb +113 -80
- data/spec/rubocop/cop/rspec/example_wording_spec.rb +33 -0
- data/spec/rubocop/cop/rspec/leaky_constant_declaration_spec.rb +91 -0
- data/spec/rubocop/cop/rspec/let_setup_spec.rb +2 -2
- data/spec/rubocop/cop/rspec/multiple_expectations_spec.rb +64 -37
- data/spec/rubocop/cop/rspec/subject_stub_spec.rb +113 -14
- data/spec/rubocop/rspec/language/selector_set_spec.rb +2 -2
- metadata +5 -2
@@ -38,7 +38,7 @@ RSpec.describe RuboCop::RSpec::Language::SelectorSet do
|
|
38
38
|
describe '#send_pattern' do
|
39
39
|
it 'builds a send matching pattern' do
|
40
40
|
expect(selector_set.send_pattern).to eql(
|
41
|
-
'(send {(const nil? :RSpec) nil?} {:foo :bar} ...)'
|
41
|
+
'(send {(const {nil? cbase} :RSpec) nil?} {:foo :bar} ...)'
|
42
42
|
)
|
43
43
|
end
|
44
44
|
end
|
@@ -46,7 +46,7 @@ RSpec.describe RuboCop::RSpec::Language::SelectorSet do
|
|
46
46
|
describe '#block_pattern' do
|
47
47
|
it 'builds a block matching pattern' do
|
48
48
|
expect(selector_set.block_pattern).to eql(
|
49
|
-
'(block (send {(const nil? :RSpec) nil?} {:foo :bar} ...) ...)'
|
49
|
+
'(block (send {(const {nil? cbase} :RSpec) nil?} {:foo :bar} ...) ...)'
|
50
50
|
)
|
51
51
|
end
|
52
52
|
end
|
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.34.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: 2019-
|
13
|
+
date: 2019-07-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- lib/rubocop/cop/rspec/it_behaves_like.rb
|
159
159
|
- lib/rubocop/cop/rspec/iterated_expectation.rb
|
160
160
|
- lib/rubocop/cop/rspec/leading_subject.rb
|
161
|
+
- lib/rubocop/cop/rspec/leaky_constant_declaration.rb
|
161
162
|
- lib/rubocop/cop/rspec/let_before_examples.rb
|
162
163
|
- lib/rubocop/cop/rspec/let_setup.rb
|
163
164
|
- lib/rubocop/cop/rspec/message_chain.rb
|
@@ -255,6 +256,7 @@ files:
|
|
255
256
|
- spec/rubocop/cop/rspec/it_behaves_like_spec.rb
|
256
257
|
- spec/rubocop/cop/rspec/iterated_expectation_spec.rb
|
257
258
|
- spec/rubocop/cop/rspec/leading_subject_spec.rb
|
259
|
+
- spec/rubocop/cop/rspec/leaky_constant_declaration_spec.rb
|
258
260
|
- spec/rubocop/cop/rspec/let_before_examples_spec.rb
|
259
261
|
- spec/rubocop/cop/rspec/let_setup_spec.rb
|
260
262
|
- spec/rubocop/cop/rspec/message_chain_spec.rb
|
@@ -374,6 +376,7 @@ test_files:
|
|
374
376
|
- spec/rubocop/cop/rspec/it_behaves_like_spec.rb
|
375
377
|
- spec/rubocop/cop/rspec/iterated_expectation_spec.rb
|
376
378
|
- spec/rubocop/cop/rspec/leading_subject_spec.rb
|
379
|
+
- spec/rubocop/cop/rspec/leaky_constant_declaration_spec.rb
|
377
380
|
- spec/rubocop/cop/rspec/let_before_examples_spec.rb
|
378
381
|
- spec/rubocop/cop/rspec/let_setup_spec.rb
|
379
382
|
- spec/rubocop/cop/rspec/message_chain_spec.rb
|