aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionmailer/test/abstract_unit.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb
index d1e69ce0fb..649e7982cc 100644
--- a/actionmailer/test/abstract_unit.rb
+++ b/actionmailer/test/abstract_unit.rb
@@ -31,9 +31,9 @@ end
# Wrap tests that use Mocha and skip if unavailable.
def uses_mocha(test_name)
- require 'mocha'
+ gem 'mocha', ">=0.5"
require 'stubba'
yield
-rescue LoadError
- $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
+rescue Gem::LoadError
+ $stderr.puts "Skipping #{test_name} tests (Mocha >= 0.5 is required). `gem install mocha` and try again."
end