[rspec-users] calling a step from a step

James Byrne lists at ruby-forum.com
Mon Nov 24 11:16:23 EST 2008

cucumber 0.1.9

I have this:

When /obtain the party (.*)/ do |n|
  n case
    when "common name"
      @party.entity_name = "Anything will do"
    when "legal name"
      @party.entity_legal_name = "Something a Bit Longer I SHOULD think"
    when "corporate form"
      @party.entity_legal_form = "PERS"
      raise ArgumentError, "#{n} attribute is not provided for."

When /should determine the party (.*) do |n|
  When "obtain the party #{n}"

# rake features gives this error:

`gem_original_require': ./features/step_definitions/entity_steps.rb:28:
unknown regexp options - rcrd (SyntaxError)
./features/step_definitions/entity_steps.rb:28: syntax error
Then /record the party/ do
./features/step_definitions/entity_steps.rb:28: syntax error

I understood that as of 0.1.7 cucumber supported steps from step calls.
Have I mistyped or misunderstood something
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list