File: with_mocha.rb [rspec-core-2.14.5 Documentation]

Last Modified
  2014-01-26 09:14:39 +0000
Requires
  - mocha/api
  - mocha/object
  - mocha/standalone
  - mocha/object

## Description

In order to support all versions of mocha, we have to jump through some hoops here.

mocha >= '0.13.0':

    require 'mocha/api' is required
    require 'mocha/object' raises a LoadError b/c the file no longer exists

mocha < '0.13.0', >= '0.9.7'

    require 'mocha/api' is required
    require 'mocha/object' is required

mocha < '0.9.7':

    require 'mocha/api' raises a LoadError b/c the file does not yet exist
    require 'mocha/standalone' is required
    require 'mocha/object' is required