Class: Cucumber::Core::Test::Runner::RunningTestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/core/test/runner.rb

Defined Under Namespace

Modules: Status

Instance Method Summary collapse

Constructor Details

#initializeRunningTestCase

Returns a new instance of RunningTestCase.



48
49
50
51
# File 'lib/cucumber/core/test/runner.rb', line 48

def initialize
  @timer = Timer.new.start
  @status = Status::Unknown.new(Result::Unknown.new)
end

Instance Method Details

#ambiguous(step_result) ⇒ Object



66
67
68
69
# File 'lib/cucumber/core/test/runner.rb', line 66

def ambiguous(step_result)
  @status = Status::Ambiguous.new(step_result)
  self
end

#duration(_step_duration, _step_result) ⇒ Object



95
96
97
# File 'lib/cucumber/core/test/runner.rb', line 95

def duration(_step_duration, _step_result)
  self
end

#exception(_step_exception, _step_result) ⇒ Object



91
92
93
# File 'lib/cucumber/core/test/runner.rb', line 91

def exception(_step_exception, _step_result)
  self
end

#execute(test_step) ⇒ Object



53
54
55
# File 'lib/cucumber/core/test/runner.rb', line 53

def execute(test_step, &)
  status.execute(test_step, self, &)
end

#failed(step_result) ⇒ Object



61
62
63
64
# File 'lib/cucumber/core/test/runner.rb', line 61

def failed(step_result)
  @status = Status::Failing.new(step_result)
  self
end

#passed(step_result) ⇒ Object



71
72
73
74
# File 'lib/cucumber/core/test/runner.rb', line 71

def passed(step_result)
  @status = Status::Passing.new(step_result)
  self
end

#pending(_message, step_result) ⇒ Object



76
77
78
79
# File 'lib/cucumber/core/test/runner.rb', line 76

def pending(_message, step_result)
  @status = Status::Pending.new(step_result)
  self
end

#resultObject



57
58
59
# File 'lib/cucumber/core/test/runner.rb', line 57

def result
  status.result(@timer.duration)
end

#skipped(step_result) ⇒ Object



81
82
83
84
# File 'lib/cucumber/core/test/runner.rb', line 81

def skipped(step_result)
  @status = Status::Skipping.new(step_result)
  self
end

#undefined(step_result) ⇒ Object



86
87
88
89
# File 'lib/cucumber/core/test/runner.rb', line 86

def undefined(step_result)
  failed(step_result)
  self
end