From 0f3fda805eb7d0db9107dd81d22ca2bfe1f3d0e9 Mon Sep 17 00:00:00 2001 From: Wojciech Piekutowski Date: Sun, 20 Feb 2011 15:38:21 +0100 Subject: [PATCH] Silence shoulda warnings --- test/test_helper.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index af35fc0..9f36955 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -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 <