module Turnip::DSL

Public Instance Methods

placeholder(*name, &block) click to toggle source
# File lib/turnip/dsl.rb, line 3
def placeholder(*name, &block)
  name.each do |n|
    Turnip::Placeholder.add(n, &block)
  end
end
step(description, &block) click to toggle source
# File lib/turnip/dsl.rb, line 9
def step(description, &block)
  Turnip::Steps.step(description, &block)
end
steps_for(tag, &block) click to toggle source
# File lib/turnip/dsl.rb, line 13
def steps_for(tag, &block)
  if tag.to_s == "global"
    warn "[Turnip] using steps_for(:global) is deprecated, add steps to Turnip::Steps instead"
    Turnip::Steps.module_eval(&block)
  else
    Module.new do
      singleton_class.send(:define_method, :tag) { tag }
      module_eval(&block)
      ::RSpec.configure { |c| c.include self, tag => true }
    end
  end
end