Files

Class/Module Index [+]

Quicksearch

Cucumber::RbSupport::RbWorld

All steps are run in the context of an object that extends this module.

Constants

AnsiEscapes

Attributes

__cucumber_step_mother[W]
__natural_language[W]

Public Class Methods

alias_adverb(adverb) click to toggle source
# File lib/cucumber/rb_support/rb_world.rb, line 10
def alias_adverb(adverb)
  alias_method adverb, :__cucumber_invoke
end

Public Instance Methods

Transform(arg) click to toggle source

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
announce(*messages) click to toggle source
# 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
ask(question, timeout_seconds=60) click to toggle source

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
doc_string(string_with_triple_quotes, file=nil, line_offset=0) click to toggle source

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
embed(file, mime_type, label='Screenshot') click to toggle source

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
pending(message = "TODO") click to toggle source

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
puts(*messages) click to toggle source

See StepMother#puts

# File lib/cucumber/rb_support/rb_world.rb, line 54
def puts(*messages)
  @__cucumber_step_mother.puts(*messages)
end
step(name, multiline_argument=nil) click to toggle source

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
steps(steps_text) click to toggle source

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
table(text_or_table, file=nil, line_offset=0) click to toggle source

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
to_s() click to toggle source
# File lib/cucumber/rb_support/rb_world.rb, line 102
def to_s
  inspect
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.