guard-rspec 2.3.1 → 2.3.2

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.
@@ -55,20 +55,23 @@ module Guard
55
55
  if File.exist?(path)
56
56
  single_spec = paths && paths.length == 1 && paths[0].include?("_spec") ? paths[0] : nil
57
57
  failed_specs = File.open(path) { |file| file.read.split("\n") }
58
+
58
59
  File.delete(path)
59
60
 
60
- if single_spec
61
+ if single_spec && @inspector.clean([single_spec]).length == 1
61
62
  failed_specs = failed_specs.select{|p| p.include? single_spec}
62
63
  end
63
-
64
+
64
65
  if failed_specs.any?
65
- # some sane limit, stuff will explode if all tests fail ... cap at 10
66
+ # some sane limit, stuff will explode if all tests fail
67
+ # ... cap at 10
68
+
66
69
  paths = failed_specs[0..10]
67
70
  focused = true
68
71
  end
69
72
 
70
73
  # switch focus to the single spec
71
- if single_spec
74
+ if single_spec and failed_specs.length > 0
72
75
  focused = true
73
76
  end
74
77
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RSpecVersion
3
- VERSION = "2.3.1"
3
+ VERSION = "2.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-07 00:00:00.000000000 Z
12
+ date: 2012-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard