Module: EventedSpec::EMSpec::ClassMethods

Defined in:
lib/evented-spec/em_spec.rb

Instance Method Summary collapse

Instance Method Details

#it(*args, &block) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/evented-spec/em_spec.rb', line 13

def it(*args, &block)
  if block
    # Shared example groups seem to pass example group instance
    # to the actual example block
    new_block = Proc.new {|example_group_instance| (example_group_instance || self).instance_eval { em(&block) } }
    super(*args, &new_block)
  else
    # pending example
    super
  end
end