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
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
#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 = Options.with_defaults() Deprecator.(@options) @runner = Runner.new(@options) end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
18 19 20 |
# File 'lib/guard/rspec.rb', line 18 def @options end |
#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
#reload ⇒ Object
36 37 38 |
# File 'lib/guard/rspec.rb', line 36 def reload runner.reload end |
#run_all ⇒ Object
32 33 34 |
# File 'lib/guard/rspec.rb', line 32 def run_all _throw_if_failed { runner.run_all } end |
#run_on_modifications(paths) ⇒ Object
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 |
#start ⇒ Object
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 |