Exception: Cucumber::Glue::MultipleWorld
- Inherits:
-
StandardError
- Object
- StandardError
- Cucumber::Glue::MultipleWorld
- Defined in:
- lib/cucumber/glue/registry_and_more.rb
Overview
Raised if there are 2 or more World blocks.
Instance Method Summary collapse
-
#initialize(first_proc, second_proc) ⇒ MultipleWorld
constructor
A new instance of MultipleWorld.
Constructor Details
#initialize(first_proc, second_proc) ⇒ MultipleWorld
Returns a new instance of MultipleWorld.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/cucumber/glue/registry_and_more.rb', line 31 def initialize(first_proc, second_proc) # TODO: [LH] - Just use a heredoc here to fix this up = String.new << "You can only pass a proc to #World once, but it's happening\n" << "in 2 places:\n\n" << Glue.backtrace_line(first_proc, 'World') << "\n" << Glue.backtrace_line(second_proc, 'World') << "\n\n" << "Use Ruby modules instead to extend your worlds. See the Cucumber::Glue::Dsl#World RDoc\n" << "or http://wiki.github.com/cucumber/cucumber/a-whole-new-world.\n\n" super() end |