Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add attr_accessor for last_failed & failed_paths

  • Loading branch information...
commit a27e3b5bb25d3a3817d16a4878e47c79e90e7dce 1 parent 6831ac4
Thibaud Guillaume-Gentil authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/guard/rspec.rb
View
6 lib/guard/rspec.rb
@@ -6,6 +6,8 @@ class RSpec < Guard
autoload :Runner, 'guard/rspec/runner'
autoload :Inspector, 'guard/rspec/inspector'
+ attr_accessor :last_failed, :failed_paths
+
def initialize(watchers = [], options = {})
super
@options = {
@@ -43,14 +45,14 @@ def reload
end
def run_on_changes(paths)
- paths += @failed_paths if @options[:keep_failed]
+ paths += failed_paths if @options[:keep_failed]
paths = @inspector.clean(paths)
if passed = @runner.run(paths)
remove_failed(paths)
# run all the specs if the run before this one failed
- if @last_failed && @options[:all_after_pass]
+ if last_failed && @options[:all_after_pass]
@last_failed = false
run_all
end
Please sign in to comment.
Something went wrong with that request. Please try again.