aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/mocha_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/testing/mocha_module.rb')
-rw-r--r--activesupport/lib/active_support/testing/mocha_module.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/mocha_module.rb b/activesupport/lib/active_support/testing/mocha_module.rb
new file mode 100644
index 0000000000..ed2942d23a
--- /dev/null
+++ b/activesupport/lib/active_support/testing/mocha_module.rb
@@ -0,0 +1,22 @@
+module ActiveSupport
+ module Testing
+ module MochaModule
+ begin
+ require 'mocha_standalone'
+ include Mocha::API
+
+ def before_setup
+ mocha_setup
+ super
+ end
+
+ def after_teardown
+ super
+ mocha_verify
+ mocha_teardown
+ end
+ rescue LoadError
+ end
+ end
+ end
+end