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.



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

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

Instance Method Details

#duration(step_duration, step_result) ⇒ Object



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

def duration(step_duration, step_result)
  self
end

#exception(step_exception, step_result) ⇒ Object



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

def exception(step_exception, step_result)
  self
end

#execute(test_step, &continue) ⇒ Object



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

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

#failed(step_result) ⇒ Object



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

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

#passed(step_result) ⇒ Object



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

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

#pending(message, step_result) ⇒ Object



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

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

#resultObject



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

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

#skipped(step_result) ⇒ Object



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

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

#undefined(step_result) ⇒ Object



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

def undefined(step_result)
  failed(step_result)
  self
end