rubocop-rspec-focused 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rubocop/cop/rspec/focused.rb +3 -1
- data/lib/rubocop/rspec/focused/version.rb +1 -1
- data/spec/lib/rubocop/cop/rspec/focused_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 467243310cd3d52aff8f74aed12c874517c29b84
|
4
|
+
data.tar.gz: 3391ab4fbc27544bb4744aba8075cc5d6d04b36a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc0f3a9d7fe52ef7d82ea22fc4cfeeafd621e450e6972ca9d76e02324abec40c30377d1cd4c8f0e66e0ac8fd00ec1e3587c88fa6f042af31c9bcb384a10ce8ec
|
7
|
+
data.tar.gz: f0a48cb5f67b5e57bb1f1202686aeba639bf5ea4691d70d06744bc2c5afd948d7f7591f5e72d317572694b8edd4436b935dd1f260cf5e38df4869f37f5948a74
|
data/CHANGELOG.md
CHANGED
@@ -40,10 +40,12 @@ module RuboCop
|
|
40
40
|
def focus_set_to_true?(metadata)
|
41
41
|
return unless metadata
|
42
42
|
|
43
|
-
metadata.include?(s(:sym, :focus)) ||
|
43
|
+
metadata.include?(s(:sym, :focus)) || (
|
44
|
+
metadata.last &&
|
44
45
|
metadata.last.children.any? do |pair|
|
45
46
|
pair == s(:pair, s(:sym, :focus), s(:true))
|
46
47
|
end
|
48
|
+
)
|
47
49
|
end
|
48
50
|
end
|
49
51
|
end
|
@@ -32,4 +32,13 @@ RSpec.describe RuboCop::Cop::RSpec::Focused do
|
|
32
32
|
expect(cop.offenses.map(&:line).sort).to eq([1])
|
33
33
|
expect(cop.messages).to eq([described_class::MESSAGE])
|
34
34
|
end
|
35
|
+
|
36
|
+
it 'does not raise error on block without arguments' do
|
37
|
+
inspect_source(cop, ['it "does something" do',
|
38
|
+
' expect(foo).to be_empty',
|
39
|
+
'end'])
|
40
|
+
expect(cop.offenses.size).to eq(0)
|
41
|
+
expect(cop.offenses.map(&:line).sort).to be_empty
|
42
|
+
expect(cop.messages).to be_empty
|
43
|
+
end
|
35
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rspec-focused
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Love With Food, Hendy Tanata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|