class Cucumber::Core::Compiler::TestCaseBuilder
@private
Attributes
receiver[R]
Public Class Methods
new(receiver)
click to toggle source
# File lib/cucumber/core/compiler.rb, line 33 def initialize(receiver) @receiver = receiver end
Public Instance Methods
on_background_step(source)
click to toggle source
# File lib/cucumber/core/compiler.rb, line 37 def on_background_step(source) background_test_steps << Test::Step.new(source) self end
on_step(source)
click to toggle source
# File lib/cucumber/core/compiler.rb, line 42 def on_step(source) test_steps << Test::Step.new(source) self end
on_test_case(source)
click to toggle source
# File lib/cucumber/core/compiler.rb, line 47 def on_test_case(source) Test::Case.new(test_steps, source).describe_to(receiver) if test_steps.count > 0 @test_steps = nil self end
Private Instance Methods
background_test_steps()
click to toggle source
# File lib/cucumber/core/compiler.rb, line 55 def background_test_steps @background_test_steps ||= [] end
test_steps()
click to toggle source
# File lib/cucumber/core/compiler.rb, line 59 def test_steps @test_steps ||= background_test_steps.dup end