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.



95
96
97
98
99
100
# File 'lib/gurke/step.rb', line 95

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.



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

def exception
  @exception
end

#scenarioObject (readonly)

Returns the value of attribute scenario.



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

def scenario
  @scenario
end

#stateObject (readonly)

Returns the value of attribute state.



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

def state
  @state
end

#stepObject (readonly)

Returns the value of attribute step.



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

def step
  @step
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/gurke/step.rb', line 108

def failed?
  @state == :failed
end

#passed?Boolean

Returns:

  • (Boolean)


120
121
122
# File 'lib/gurke/step.rb', line 120

def passed?
  @state == :passed
end

#pending?Boolean

Returns:

  • (Boolean)


112
113
114
# File 'lib/gurke/step.rb', line 112

def pending?
  @state == :pending
end

#skipped?Boolean

Returns:

  • (Boolean)


116
117
118
# File 'lib/gurke/step.rb', line 116

def skipped?
  @state == :skipped
end