Method: MotionSpec::Context#it

Defined in:
lib/motion-spec/context.rb

#it(description = '', &block) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/motion-spec/context.rb', line 72

def it(description = '', &block)
  return unless description =~ RestrictName

  block ||= proc { should.flunk 'not implemented' }

  Counter[:specifications] += 1

  @after << proc { verify_mocks_were_called }

  @specifications << Specification.new(
    self, description, block, @before, @after
  )
end