guard-rspec 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/rspec.rb +7 -4
- data/lib/guard/rspec/version.rb +1 -1
- metadata +2 -2
data/lib/guard/rspec.rb
CHANGED
@@ -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
|
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
|
data/lib/guard/rspec/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|