Module: Cucumber::JBehave

Defined in:
lib/cucumber/jbehave.rb

Defined Under Namespace

Classes: JBehaveCandidateStep, JBehaveException, JBehaveStepDefinition, Reporter

Constant Summary collapse

REPORTER =
Reporter.new

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.snippet_text(step_keyword, step_name) ⇒ Object



86
87
88
89
90
91
92
93
# File 'lib/cucumber/jbehave.rb', line 86

def self.snippet_text(step_keyword, step_name)
  camel = step_name.gsub(/(\s.)/) {$1.upcase.strip}
  method = camel[0..0].downcase + camel[1..-1]
  snippet = %{    @#{step_keyword}("#{step_name}")
    public void #{method}() {
  throw new RuntimeException("pending");
    }}
end

Instance Method Details

#JBehave(jbehave_steps) ⇒ Object

Register an instance of org.jbehave.scenario.steps.Steps



9
10
11
12
13
# File 'lib/cucumber/jbehave.rb', line 9

def JBehave(jbehave_steps)
  jbehave_steps.getSteps.each do |jbehave_candidate_step|
    step_definitions << JBehaveStepDefinition.new(jbehave_steps, jbehave_candidate_step)
  end
end