summaryrefslogtreecommitdiff
path: root/spec/mspec/lib/mspec/runner/object.rb
blob: 018e35614972f0389752e4d52b9ba11a26aa37e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class Object
  def before(at=:each, &block)
    MSpec.current.before at, &block
  end

  def after(at=:each, &block)
    MSpec.current.after at, &block
  end

  def describe(mod, msg=nil, options=nil, &block)
    MSpec.describe mod, msg, &block
  end

  def it(msg, &block)
    MSpec.current.it msg, &block
  end

  def it_should_behave_like(desc)
    MSpec.current.it_should_behave_like desc
  end

  # For ReadRuby compatiability
  def doc(*a)
  end

  alias_method :context, :describe
  alias_method :specify, :it
end