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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77dc402b38ff0555f83ff46c05891ef6eabc19f2
4
- data.tar.gz: 278fb1373ce6fb4b4c7ed2842b9c78acf46d3928
3
+ metadata.gz: 467243310cd3d52aff8f74aed12c874517c29b84
4
+ data.tar.gz: 3391ab4fbc27544bb4744aba8075cc5d6d04b36a
5
5
  SHA512:
6
- metadata.gz: 14f6217942dbdfd3bcc81c1e69a7799761b71e9b5894d3e280062e3b76d8d4a96b1b36b7d7a87cc4e013b0ec9f53cc94a4946e1ddd80444bc84df002af56eea2
7
- data.tar.gz: 16a7cbe8f6fc304efb61fd76b587056bbe4ccc88ad241fe9abf118a3e219fd11ef7cae0d99ecca2698a9f9850becac8ac9a241663116949caf0733327f2b198d
6
+ metadata.gz: dc0f3a9d7fe52ef7d82ea22fc4cfeeafd621e450e6972ca9d76e02324abec40c30377d1cd4c8f0e66e0ac8fd00ec1e3587c88fa6f042af31c9bcb384a10ce8ec
7
+ data.tar.gz: f0a48cb5f67b5e57bb1f1202686aeba639bf5ea4691d70d06744bc2c5afd948d7f7591f5e72d317572694b8edd4436b935dd1f260cf5e38df4869f37f5948a74
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## master (unreleased)
2
2
 
3
+ ## 0.0.3
4
+
5
+ * Fix error when block method has no arguments.
6
+
3
7
  ## 0.0.2
4
8
 
5
9
  * Support symbols passed as metadata, e.g:
@@ -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
@@ -1,7 +1,7 @@
1
1
  module RuboCop
2
2
  module RSpec
3
3
  module Focused
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
6
6
  end
7
7
  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.2
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-04 00:00:00.000000000 Z
11
+ date: 2015-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop