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

#duration(_step_duration, _step_result) ⇒ Object



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

def duration(_step_duration, _step_result)
  self
end

#exception(_step_exception, _step_result) ⇒ Object



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

def exception(_step_exception, _step_result)
  self
end

#execute(test_step, &continue) ⇒ Object



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

def execute(test_step, &continue)
  status.execute(test_step, self, &continue)
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



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

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

#pending(_message, step_result) ⇒ Object



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

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



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

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

#undefined(step_result) ⇒ Object



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

def undefined(step_result)
  failed(step_result)
  self
end