mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test requirement fix (closes #9276) [lazyatom]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
a5fde99873
commit
6ccf503229
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue