Class: Guard::RSpec::RSpecProcess

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/rspec/rspec_process.rb

Defined Under Namespace

Classes: Failure

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, formatter_tmp_file, options = {}) ⇒ RSpecProcess

Returns a new instance of RSpecProcess.



11
12
13
14
15
16
17
18
19
# File 'lib/guard/rspec/rspec_process.rb', line 11

def initialize(command, formatter_tmp_file, options = {})
  @command = command
  @formatter_tmp_file = formatter_tmp_file
  @results = nil
  @options = options

  @exit_code = _run
  @results = _read_results
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/guard/rspec/rspec_process.rb', line 9

def options
  @options
end

#resultsObject (readonly)

Returns the value of attribute results.



9
10
11
# File 'lib/guard/rspec/rspec_process.rb', line 9

def results
  @results
end

Instance Method Details

#all_green?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/guard/rspec/rspec_process.rb', line 21

def all_green?
  exit_code.zero?
end