class Spinach::Feature
Attributes
background[RW]
description[RW]
filename[RW]
lines_to_run[R]
name[RW]
ordering_id[RW]
scenarios[RW]
Public Class Methods
new()
click to toggle source
# File lib/spinach/feature.rb, line 9 def initialize @scenarios = [] @tags = [] @lines_to_run = [] end
Public Instance Methods
background_steps()
click to toggle source
# File lib/spinach/feature.rb, line 15 def background_steps @background.nil? ? [] : @background.steps end
each_step() { |step| ... }
click to toggle source
Run the provided code for every step
# File lib/spinach/feature.rb, line 36 def each_step scenarios.each { |scenario| scenario.steps.each { |step| yield step } } end
lines_to_run=(lines)
click to toggle source
# File lib/spinach/feature.rb, line 19 def lines_to_run=(lines) @lines_to_run = lines.map(&:to_i) if lines && lines.any? end
run_every_scenario?()
click to toggle source
# File lib/spinach/feature.rb, line 23 def run_every_scenario? lines_to_run.empty? end