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.



40
41
42
43
# File 'lib/cucumber/core/test/runner.rb', line 40

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

Instance Method Details

#duration(step_duration, step_result) ⇒ Object



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

def duration(step_duration, step_result)
  self
end

#exception(step_exception, step_result) ⇒ Object



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

def exception(step_exception, step_result)
  self
end

#execute(test_step, &continue) ⇒ Object



45
46
47
# File 'lib/cucumber/core/test/runner.rb', line 45

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

#failed(step_result) ⇒ Object



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

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

#passed(step_result) ⇒ Object



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

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

#pending(message, step_result) ⇒ Object



63
64
65
66
# File 'lib/cucumber/core/test/runner.rb', line 63

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

#resultObject



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

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

#skipped(step_result) ⇒ Object



68
69
70
71
# File 'lib/cucumber/core/test/runner.rb', line 68

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

#undefined(step_result) ⇒ Object



73
74
75
76
# File 'lib/cucumber/core/test/runner.rb', line 73

def undefined(step_result)
  failed(step_result)
  self
end