Class: Gurke::Step::StepResult

Inherits:
Object
  • Object
show all
Defined in:
lib/gurke/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step, scenario, state, err = nil) ⇒ StepResult

Returns a new instance of StepResult.



93
94
95
96
97
98
# File 'lib/gurke/step.rb', line 93

def initialize(step, scenario, state, err = nil)
  @step = step
  @state = state
  @scenario = scenario
  @exception = err
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



91
92
93
# File 'lib/gurke/step.rb', line 91

def exception
  @exception
end

#scenarioObject (readonly)

Returns the value of attribute scenario.



91
92
93
# File 'lib/gurke/step.rb', line 91

def scenario
  @scenario
end

#stateObject (readonly)

Returns the value of attribute state.



91
92
93
# File 'lib/gurke/step.rb', line 91

def state
  @state
end

#stepObject (readonly)

Returns the value of attribute step.



91
92
93
# File 'lib/gurke/step.rb', line 91

def step
  @step
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


106
107
108
# File 'lib/gurke/step.rb', line 106

def failed?
  @state == :failed
end

#passed?Boolean

Returns:

  • (Boolean)


118
119
120
# File 'lib/gurke/step.rb', line 118

def passed?
  @state == :passed
end

#pending?Boolean

Returns:

  • (Boolean)


110
111
112
# File 'lib/gurke/step.rb', line 110

def pending?
  @state == :pending
end

#skipped?Boolean

Returns:

  • (Boolean)


114
115
116
# File 'lib/gurke/step.rb', line 114

def skipped?
  @state == :skipped
end