aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-01-14 12:49:55 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-01-14 12:49:55 +0000
commita6e12c0c21159503cef99fa69be7a708a2d39ed9 (patch)
tree5071f4ea68b8d078580c55e8e9824f3a9bb840d0 /actionpack/test/abstract_unit.rb
parent6714b39a133bb8da1b4f6f485f35494ff8ad87ab (diff)
downloadrails-a6e12c0c21159503cef99fa69be7a708a2d39ed9.tar.gz
rails-a6e12c0c21159503cef99fa69be7a708a2d39ed9.tar.bz2
rails-a6e12c0c21159503cef99fa69be7a708a2d39ed9.zip
Wrap and skip tests using mocha.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index de4ca439f4..bc7c80f1ce 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -14,3 +14,13 @@ ActiveSupport::Deprecation.debug = true
ActionController::Base.logger = nil
ActionController::Base.ignore_missing_templates = false
ActionController::Routing::Routes.reload rescue nil
+
+
+# Wrap tests that use Mocha and skip if unavailable.
+def uses_mocha(test_name)
+ require 'mocha'
+ require 'stubba'
+ yield
+rescue LoadError
+ $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
+end