Silence shoulda warnings
This commit is contained in:
parent
57d95c9ab3
commit
0f3fda805e
|
@ -3,9 +3,17 @@ require 'rubygems' if ENV['C_EXT']
|
|||
require 'mongo'
|
||||
require 'test/unit'
|
||||
|
||||
def silently
|
||||
warn_level = $VERBOSE
|
||||
$VERBOSE = nil
|
||||
result = yield
|
||||
$VERBOSE = warn_level
|
||||
result
|
||||
end
|
||||
|
||||
begin
|
||||
require 'rubygems'
|
||||
require 'shoulda'
|
||||
silently { require 'shoulda' }
|
||||
require 'mocha'
|
||||
rescue LoadError
|
||||
puts <<MSG
|
||||
|
|
Loading…
Reference in New Issue