Method: RSpecStepwise::ClassMethods#after

Defined in:
lib/two-step/stepwise.rb

#after(*args, &block) ⇒ Object



108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/two-step/stepwise.rb', line 108

def after(*args, &block)
  if args.first == :step
    args.shift
    options = (args)
    hooks[:after][:step] ||= []
    return (hooks[:after][:step].unshift build_after_hook(options, &block))
  end
  if args.first == :each
    puts "after blocks declared for steps are always treated as :all scope"
  end
  super
end