lib/cucumber/rb_support/rb_world.rb in cucumber-2.0.0.beta.2 vs lib/cucumber/rb_support/rb_world.rb in cucumber-2.0.0.beta.3
- old
+ new
@@ -34,13 +34,11 @@
# @example Passing a multiline string
# step "the email should contain:", "Dear sir,\nYou've won a prize!\n"
# @param [String] name The name of the step
# @param [String,Cucumber::Ast::DocString,Cucumber::Ast::Table] multiline_argument
def step(name, raw_multiline_arg=nil)
- # TODO: this argument parsing should move up out of core
- location = Core::Ast::Location.new(*caller[0].split(':')[0..1])
- core_multiline_arg = Core::Ast::MultilineArgument.from(raw_multiline_arg, location)
- @__cucumber_runtime.invoke(name, MultilineArgument.from(core_multiline_arg), location)
+ location = Core::Ast::Location.of_caller
+ @__cucumber_runtime.invoke(name, MultilineArgument.from(raw_multiline_arg, location))
end
# Run a snippet of Gherkin
# @example
# steps %{