Class: Guard::RSpec::Runner
- Inherits:
-
Object
- Object
- Guard::RSpec::Runner
- Defined in:
- lib/guard/rspec/runner.rb
Defined Under Namespace
Classes: NoCmdOptionError
Instance Attribute Summary collapse
-
#inspector ⇒ Object
Returns the value of attribute inspector.
-
#notifier ⇒ Object
Returns the value of attribute notifier.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #reload ⇒ Object
- #run(paths) ⇒ Object
- #run_all ⇒ Object
Constructor Details
Instance Attribute Details
#inspector ⇒ Object
Returns the value of attribute inspector.
18 19 20 |
# File 'lib/guard/rspec/runner.rb', line 18 def inspector @inspector end |
#notifier ⇒ Object
Returns the value of attribute notifier.
18 19 20 |
# File 'lib/guard/rspec/runner.rb', line 18 def notifier @notifier end |
#options ⇒ Object
Returns the value of attribute options.
18 19 20 |
# File 'lib/guard/rspec/runner.rb', line 18 def @options end |
Instance Method Details
#reload ⇒ Object
45 46 47 |
# File 'lib/guard/rspec/runner.rb', line 45 def reload inspector.reload end |
#run(paths) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/guard/rspec/runner.rb', line 34 def run(paths) paths = inspector.paths(paths) return true if paths.empty? Compat::UI.info("Running: #{paths.join(' ')}", reset: true) _run(paths, ) do |all_green| next false unless all_green next true unless [:all_after_pass] run_all end end |
#run_all ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/guard/rspec/runner.rb', line 26 def run_all paths = [:spec_paths] = @options.merge(@options[:run_all]) return true if paths.empty? Compat::UI.info([:message], reset: true) _run(paths, ) end |