rubocop-rspec 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7161e38d3d46174e4acad35bf1ab6b7fdd8d62d4
|
4
|
+
data.tar.gz: d9b7e70692513359abc3501795939c31075bd3dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d57d6b57e5333d78635bcc4282ece219f7c2ebc0b7ed394e65da9a4167861752ec69bc4e588038737c21af69b1cfe86959d82fef02cce16e9dccd2ef9718fd0
|
7
|
+
data.tar.gz: d961bdccd80bab88bb0c04f00c2e27003e7203aa212a0ec12f8403455e522d8b85b7171e0fd27e495dd524569df2246f3590dd660db7974997f052160f51c91b
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Master (unreleased)
|
4
4
|
|
5
|
+
## 1.9.1 (2017-01-02)
|
6
|
+
|
7
|
+
* Fix unintentional regression change in `NestedGroups` reported in #270. ([@backus][])
|
8
|
+
* Change `MaxNesting` for `NestedGroups` from 2 to 3. ([@backus][])
|
9
|
+
|
5
10
|
## 1.9.0 (2016-12-29)
|
6
11
|
|
7
12
|
* Add `MessageSpies` cop for enforcing consistent style of either `expect(...).to have_received` or `expect(...).to receive`, intended as a replacement for the `MessageExpectation` cop. ([@bquorning][])
|
data/config/default.yml
CHANGED
@@ -91,11 +91,8 @@ module RuboCop
|
|
91
91
|
|
92
92
|
def_node_search :find_contexts, ExampleGroups::ALL.block_pattern
|
93
93
|
|
94
|
-
def
|
95
|
-
|
96
|
-
return unless describe
|
97
|
-
|
98
|
-
find_nested_contexts(node) do |context|
|
94
|
+
def on_top_level_describe(node, _)
|
95
|
+
find_nested_contexts(node.parent) do |context|
|
99
96
|
add_offense(context.children.first, :expression)
|
100
97
|
end
|
101
98
|
end
|
@@ -113,7 +110,7 @@ module RuboCop
|
|
113
110
|
end
|
114
111
|
|
115
112
|
def max_nesting
|
116
|
-
Integer(cop_config.fetch('MaxNesting',
|
113
|
+
Integer(cop_config.fetch('MaxNesting', 3))
|
117
114
|
end
|
118
115
|
end
|
119
116
|
end
|
@@ -8,7 +8,6 @@ describe RuboCop::Cop::RSpec::NestedGroups, :config do
|
|
8
8
|
describe MyClass do
|
9
9
|
context 'when foo' do
|
10
10
|
context 'when bar' do
|
11
|
-
^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
|
12
11
|
context 'when baz' do
|
13
12
|
^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
|
14
13
|
end
|
@@ -17,7 +16,6 @@ describe RuboCop::Cop::RSpec::NestedGroups, :config do
|
|
17
16
|
|
18
17
|
context 'when qux' do
|
19
18
|
context 'when norf' do
|
20
|
-
^^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
|
21
19
|
end
|
22
20
|
end
|
23
21
|
end
|
@@ -35,14 +33,15 @@ describe RuboCop::Cop::RSpec::NestedGroups, :config do
|
|
35
33
|
RUBY
|
36
34
|
end
|
37
35
|
|
38
|
-
context 'when MaxNesting is configured as
|
39
|
-
let(:cop_config) { { 'MaxNesting' => '
|
36
|
+
context 'when MaxNesting is configured as 2' do
|
37
|
+
let(:cop_config) { { 'MaxNesting' => '2' } }
|
40
38
|
|
41
|
-
it '
|
39
|
+
it 'flags two levels of nesting' do
|
42
40
|
expect_violation(<<-RUBY)
|
43
41
|
describe MyClass do
|
44
42
|
context 'when foo' do
|
45
43
|
context 'when bar' do
|
44
|
+
^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
|
46
45
|
context 'when baz' do
|
47
46
|
^^^^^^^^^^^^^^^^^^ Maximum example group nesting exceeded
|
48
47
|
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.9.
|
4
|
+
version: 1.9.1
|
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:
|
13
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
252
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.5.
|
253
|
+
rubygems_version: 2.5.1
|
254
254
|
signing_key:
|
255
255
|
specification_version: 4
|
256
256
|
summary: Code style checking for RSpec files
|