All steps are run in the context of an object that extends this module.
# File lib/cucumber/rb_support/rb_world.rb, line 10 def alias_adverb(adverb) alias_method adverb, :__cucumber_invoke end
Call a #Transform with a string from another #Transform definition
# File lib/cucumber/rb_support/rb_world.rb, line 16 def Transform(arg) rb = @__cucumber_step_mother.load_programming_language('rb') rb.execute_transforms([arg]).first end
# File lib/cucumber/rb_support/rb_world.rb, line 48 def announce(*messages) STDERR.puts AnsiEscapes.failed + "WARNING: #announce is deprecated. Use #puts instead:" + caller[0] + AnsiEscapes.reset puts(*messages) end
See StepMother#ask
# File lib/cucumber/rb_support/rb_world.rb, line 59 def ask(question, timeout_seconds=60) @__cucumber_step_mother.ask(question, timeout_seconds) end
See StepMother#doc_string
# File lib/cucumber/rb_support/rb_world.rb, line 44 def doc_string(string_with_triple_quotes, file=nil, line_offset=0) @__cucumber_step_mother.doc_string(string_with_triple_quotes, file, line_offset) end
See StepMother#embed
# File lib/cucumber/rb_support/rb_world.rb, line 64 def embed(file, mime_type, label='Screenshot') @__cucumber_step_mother.embed(file, mime_type, label) end
Mark the matched step as pending.
# File lib/cucumber/rb_support/rb_world.rb, line 69 def pending(message = "TODO") if block_given? begin yield rescue Exception => e raise Pending.new(message) end raise Pending.new("Expected pending '#{message}' to fail. No Error was raised. No longer pending?") else raise Pending.new(message) end end
See StepMother#puts
# File lib/cucumber/rb_support/rb_world.rb, line 54 def puts(*messages) @__cucumber_step_mother.puts(*messages) end
Invoke a single step.
# File lib/cucumber/rb_support/rb_world.rb, line 29 def step(name, multiline_argument=nil) @__cucumber_step_mother.invoke(name, multiline_argument) end
See StepMother#invoke_steps
# File lib/cucumber/rb_support/rb_world.rb, line 34 def steps(steps_text) @__cucumber_step_mother.invoke_steps(steps_text, @__natural_language, caller[0]) end
See StepMother#table
# File lib/cucumber/rb_support/rb_world.rb, line 39 def table(text_or_table, file=nil, line_offset=0) @__cucumber_step_mother.table(text_or_table, file, line_offset) end
# File lib/cucumber/rb_support/rb_world.rb, line 102 def to_s inspect end