aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/mochaing.rb
blob: 4ad75a668153f1cbeda58d08b9f5cbaa23542eb7 (plain) (blame)
1
2
3
4
5
6
7
begin
  silence_warnings { require 'mocha' }
rescue LoadError
  # Fake Mocha::ExpectationError so we can rescue it in #run. Bleh.
  Object.const_set :Mocha, Module.new
  Mocha.const_set :ExpectationError, Class.new(StandardError)
end