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.



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

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.



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

def exception
  @exception
end

#scenarioObject (readonly)

Returns the value of attribute scenario.



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

def scenario
  @scenario
end

#stateObject (readonly)

Returns the value of attribute state.



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

def state
  @state
end

#stepObject (readonly)

Returns the value of attribute step.



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

def step
  @step
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


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

def failed?
  @state == :failed
end

#passed?Boolean

Returns:

  • (Boolean)


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

def passed?
  @state == :passed
end

#pending?Boolean

Returns:

  • (Boolean)


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

def pending?
  @state == :pending
end

#skipped?Boolean

Returns:

  • (Boolean)


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

def skipped?
  @state == :skipped
end