Module: Kintama::Mocha

Defined in:
lib/kintama/mocha.rb

Defined Under Namespace

Modules: Expect

Class Method Summary collapse

Class Method Details

.setupObject


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/kintama/mocha.rb', line 14

def self.setup
  Kintama.include Mocha::API
  Kintama.include Mocha::Hooks
  Kintama.extend(Kintama::Mocha::Expect)

  Kintama.setup do
    mocha_setup
  end
  Kintama.teardown do
    begin
      mocha_verify
    rescue Mocha::ExpectationError => e
      raise e
    ensure
      mocha_teardown
    end
  end
end