Exception: Cucumber::MultipleWorld

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cucumber/step_mother.rb

Instance Method Summary collapse

Constructor Details

#initialize(first_proc, second_proc) ⇒ MultipleWorld

Returns a new instance of MultipleWorld.



55
56
57
58
59
60
61
62
63
# File 'lib/cucumber/step_mother.rb', line 55

def initialize(first_proc, second_proc)
  message = "You can only pass a proc to #World once, but it's happening\n"
  message << "in 2 places:\n\n"
  message << first_proc.backtrace_line('World') << "\n"
  message << second_proc.backtrace_line('World') << "\n\n"
  message << "Use Ruby modules instead to extend your worlds. See the Cucumber::StepMother#World RDoc\n"
  message << "or http://wiki.github.com/aslakhellesoy/cucumber/a-whole-new-world.\n\n"
  super(message)
end