class Gurke::Background

Attributes

file[R]

Return path to file containing this background.

@return [String] File path.

line[R]

Return line number where this background is defined.

@return [Fixnum] Line number.

raw[R]

@api private

steps[R]

List of steps this background specifies.

@return [Array<Step>] Steps.

Public Class Methods

new(file, line, raw) click to toggle source

@api private

# File lib/gurke/background.rb, line 29
def initialize(file, line, raw)
  @file  = file
  @line  = line
  @raw   = raw
  @steps = RunList.new
end

Public Instance Methods

run(runner, reporter, scenario, world) click to toggle source

@api private

# File lib/gurke/background.rb, line 38
def run(runner, reporter, scenario, world)
  reporter.invoke :start_background, self, scenario

  steps.run runner, reporter, scenario, world
ensure
  reporter.invoke :end_background, self, scenario
end