class Guard::RSpec

Attributes

options[RW]
runner[RW]

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method
# File lib/guard/rspec.rb, line 20
def initialize(options = {})
  super
  @options = Options.with_defaults(options)
  Deprecator.warns_about_deprecated_options(@options)
  @runner = Runner.new(@options)
end

Public Instance Methods

reload() click to toggle source
# File lib/guard/rspec.rb, line 36
def reload
  runner.reload
end
run_all() click to toggle source
# File lib/guard/rspec.rb, line 32
def run_all
  _throw_if_failed { runner.run_all }
end
run_on_modifications(paths) click to toggle source
# 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() click to toggle source
# File lib/guard/rspec.rb, line 27
def start
  Compat::UI.info "Guard::RSpec is running"
  run_all if options[:all_on_start]
end

Private Instance Methods

_throw_if_failed() { || ... } click to toggle source
# File lib/guard/rspec.rb, line 47
def _throw_if_failed
  throw :task_has_failed unless yield
end