Class: Guard::RSpec
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::RSpec
- Defined in:
- lib/guard/rspec.rb,
lib/guard/rspec/dsl.rb,
lib/guard/rspec/runner.rb,
lib/guard/rspec/command.rb,
lib/guard/rspec/options.rb,
lib/guard/rspec/results.rb,
lib/guard/rspec/notifier.rb,
lib/guard/rspec/deprecator.rb,
lib/guard/rspec/rspec_process.rb,
lib/guard/rspec/inspectors/factory.rb,
lib/guard/rspec/inspectors/base_inspector.rb,
lib/guard/rspec/inspectors/simple_inspector.rb,
lib/guard/rspec/inspectors/focused_inspector.rb,
lib/guard/rspec/inspectors/keeping_inspector.rb more...
Defined Under Namespace
Modules: Inspectors, Options Classes: Command, Deprecator, Dsl, Notifier, RSpecProcess, Results, Runner
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#runner ⇒ Object
Returns the value of attribute runner.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RSpec
constructor
A new instance of RSpec.
- #reload ⇒ Object
- #run_all ⇒ Object
- #run_on_modifications(paths) ⇒ Object
- #start ⇒ Object
Constructor Details
permalink #initialize(options = {}) ⇒ RSpec
Returns a new instance of RSpec.
20 21 22 23 24 25 |
# File 'lib/guard/rspec.rb', line 20 def initialize( = {}) super = Options.with_defaults() Deprecator.() @runner = Runner.new() end |
Instance Attribute Details
permalink #options ⇒ Object
Returns the value of attribute options.
18 19 20 |
# File 'lib/guard/rspec.rb', line 18 def end |
permalink #runner ⇒ Object
Returns the value of attribute runner.
18 19 20 |
# File 'lib/guard/rspec.rb', line 18 def runner @runner end |
Instance Method Details
permalink #reload ⇒ Object
[View source] [View on GitHub]
36 37 38 |
# File 'lib/guard/rspec.rb', line 36 def reload runner.reload end |
permalink #run_all ⇒ Object
[View source] [View on GitHub]
32 33 34 |
# File 'lib/guard/rspec.rb', line 32 def run_all _throw_if_failed { runner.run_all } end |
permalink #run_on_modifications(paths) ⇒ Object
[View source] [View on GitHub]
40 41 42 43 |
# File 'lib/guard/rspec.rb', line 40 def run_on_modifications(paths) return false if paths.empty? _throw_if_failed { runner.run(paths) } end |
permalink #start ⇒ Object
[View source] [View on GitHub]
27 28 29 30 |
# File 'lib/guard/rspec.rb', line 27 def start Compat::UI.info "Guard::RSpec is running" run_all if [:all_on_start] end |