Silence shoulda warnings

This commit is contained in:
Wojciech Piekutowski 2011-02-20 15:38:21 +01:00
parent 57d95c9ab3
commit 0f3fda805e
1 changed files with 9 additions and 1 deletions

View File

@ -3,9 +3,17 @@ require 'rubygems' if ENV['C_EXT']
require 'mongo' require 'mongo'
require 'test/unit' require 'test/unit'
def silently
warn_level = $VERBOSE
$VERBOSE = nil
result = yield
$VERBOSE = warn_level
result
end
begin begin
require 'rubygems' require 'rubygems'
require 'shoulda' silently { require 'shoulda' }
require 'mocha' require 'mocha'
rescue LoadError rescue LoadError
puts <<MSG puts <<MSG