rubocop-rspec 1.22.1 → 1.22.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45305dc24c290781dd6ea63a81c7ec1c99badf079e3f52cce42f92da63c360b4
|
4
|
+
data.tar.gz: e2532b3fd549df87cccbd1e060f6a7dbb01b94ed290a3ee32b63961a4cfc57bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 462eb5bf9cfd3aa17eddf02aca0a223fecb50f915adf6715c1484c7153b8b650b2205d9d2e6d12989c8097acd68d07e03104c6809f0ed67d901972efe9edf7ac
|
7
|
+
data.tar.gz: 01662e9fa466a98a282eb5d2256bf5f1c7c9680390c22c2b8e8af0a7eb5313dcf2ada617cda57f2d682b661ea04652548869cd711e1990f9e739df08071aa2d5
|
data/CHANGELOG.md
CHANGED
@@ -49,12 +49,12 @@ module RuboCop
|
|
49
49
|
def_node_matcher :scope_changing_syntax?, '{def class module}'
|
50
50
|
|
51
51
|
def on_block(node)
|
52
|
-
|
53
|
-
|
52
|
+
# In case the explicit style is used, we needs to remember what's
|
53
|
+
# being described. Thus, we use an ivar for @described_class.
|
54
|
+
describe, @described_class, body = described_constant(node)
|
54
55
|
|
55
|
-
|
56
|
-
|
57
|
-
@described_class = described_class
|
56
|
+
return if body.nil?
|
57
|
+
return unless top_level_describe?(describe)
|
58
58
|
|
59
59
|
find_usage(body) do |match|
|
60
60
|
add_offense(
|
@@ -202,6 +202,13 @@ RSpec.describe RuboCop::Cop::RSpec::DescribedClass, :config do
|
|
202
202
|
RUBY
|
203
203
|
end
|
204
204
|
|
205
|
+
it 'accepts an empty block' do
|
206
|
+
expect_no_offenses(<<-RUBY)
|
207
|
+
describe MyClass do
|
208
|
+
end
|
209
|
+
RUBY
|
210
|
+
end
|
211
|
+
|
205
212
|
include_examples 'autocorrect',
|
206
213
|
'describe(Foo) { include Foo }',
|
207
214
|
'describe(Foo) { include described_class }'
|
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.22.
|
4
|
+
version: 1.22.2
|
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-01
|
13
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|