Class: Guard::MochaNode::SpecState

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/mocha_node/spec_state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSpecState

Returns a new instance of SpecState.



6
7
8
# File 'lib/guard/mocha_node/spec_state.rb', line 6

def initialize
  clear!
end

Instance Attribute Details

#failing_pathsObject

Returns the value of attribute failing_paths.



4
5
6
# File 'lib/guard/mocha_node/spec_state.rb', line 4

def failing_paths
  @failing_paths
end

Instance Method Details

#clear!Object



26
27
28
29
30
# File 'lib/guard/mocha_node/spec_state.rb', line 26

def clear!
  @passed = true
  @fixed  = false
  @failing_paths = []
end

#fixed?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/guard/mocha_node/spec_state.rb', line 22

def fixed?
  @fixed
end

#passing?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/guard/mocha_node/spec_state.rb', line 18

def passing?
  @passed
end

#update(run_paths = [], options = {}) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/guard/mocha_node/spec_state.rb', line 10

def update(run_paths = [], options = {})
  @run_paths = run_paths
  @exitok = Runner.run(@run_paths, options)
  update_passed_and_fixed
  update_failing_paths
  passing?
end