Method: RSpecStepwise::ClassMethods#perform_steps

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

#perform_steps(name, *args, &customization_block) ⇒ Object



164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/two-step/stepwise.rb', line 164

def perform_steps(name, *args, &customization_block)
  shared_block = nil
  if world.respond_to? :shared_example_groups
    shared_block = world.shared_example_groups[name]
  else
    shared_block = shared_example_groups[name]
  end
  raise "Could not find shared example group named #{name.inspect}" unless shared_block

  module_eval_with_args(*args, &shared_block)
  module_eval(&customization_block) if customization_block
end