Class: Guard::RSpec::Runner
- Inherits:
-
Object
- Object
- Guard::RSpec::Runner
- Defined in:
- lib/guard/rspec/runner.rb
Instance Attribute Summary collapse
-
#rspec_version ⇒ Object
readonly
Returns the value of attribute rspec_version.
Instance Method Summary collapse
Instance Attribute Details
#rspec_version ⇒ Object (readonly)
Returns the value of attribute rspec_version.
4 5 6 |
# File 'lib/guard/rspec/runner.rb', line 4 def rspec_version @rspec_version end |
Instance Method Details
#run(paths, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/guard/rspec/runner.rb', line 6 def run(paths, ={}) return false if paths.empty? = [:message] || "Running: #{paths.join(' ')}" UI.info(, :reset => true) system(rspec_command(paths, )) if [:notification] != false && !drb?() && failure_exit_code_supported?() && $? && !$?.success? && $?.exitstatus != failure_exit_code Notifier.notify("Failed", :title => "RSpec results", :image => :failed, :priority => 2) end $?.success? end |
#set_rspec_version(options = {}) ⇒ Object
19 20 21 |
# File 'lib/guard/rspec/runner.rb', line 19 def set_rspec_version(={}) @rspec_version = [:version] || determine_rspec_version end |