Class: Cucumber::Core::Test::Runner::StepRunner::Default

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

Instance Method Summary collapse

Constructor Details

#initializeDefault

Returns a new instance of Default.



10
11
12
# File 'lib/cucumber/core/test/runner.rb', line 10

def initialize
  @timer = Timer.new.start
end

Instance Method Details

#duration(step_duration, step_result) ⇒ Object



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

def duration(step_duration, step_result)
  self
end

#exception(step_exception, step_result) ⇒ Object



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

def exception(step_exception, step_result)
  self
end

#execute(test_step) ⇒ Object



14
15
16
# File 'lib/cucumber/core/test/runner.rb', line 14

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

#failed(step_result) ⇒ Object



22
23
24
25
# File 'lib/cucumber/core/test/runner.rb', line 22

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

#passed(step_result) ⇒ Object



27
28
29
30
# File 'lib/cucumber/core/test/runner.rb', line 27

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

#pending(message, step_result) ⇒ Object



32
33
34
35
# File 'lib/cucumber/core/test/runner.rb', line 32

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

#resultObject



18
19
20
# File 'lib/cucumber/core/test/runner.rb', line 18

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

#undefined(step_result) ⇒ Object



37
38
39
40
# File 'lib/cucumber/core/test/runner.rb', line 37

def undefined(step_result)
  failed(step_result)
  self
end