Module: Bogus::RSpecExtensions

Defined in:
lib/bogus/rspec/extensions.rb

Instance Method Summary collapse

Instance Method Details

#fake(name, opts = {}, &block) ⇒ Object



5
6
7
# File 'lib/bogus/rspec/extensions.rb', line 5

def fake(name, opts = {}, &block)
  let(name) { fake(name, opts, &block) }
end

#fake_class(name, opts = {}) ⇒ Object



9
10
11
12
13
# File 'lib/bogus/rspec/extensions.rb', line 9

def fake_class(name, opts = {})
  before do
    fake_class(name, opts)
  end
end

#verify_contract(name, &block) ⇒ Object



15
16
17
18
# File 'lib/bogus/rspec/extensions.rb', line 15

def verify_contract(name, &block)
  syntax = RSpecSyntax.new(self)
  Bogus.add_contract_verification(syntax, name, &block)
end