test/helper.rb in paperclip-2.3.0 vs test/helper.rb in paperclip-2.3.1
- old
+ new
@@ -1,11 +1,13 @@
require 'rubygems'
require 'test/unit'
require 'shoulda'
-require 'mocha'
require 'tempfile'
+gem 'jferris-mocha', '0.9.5.0.1241126838'
+require 'mocha'
+
gem 'sqlite3-ruby'
require 'active_record'
require 'active_support'
begin
@@ -94,6 +96,13 @@
end
end
def attachment options
Paperclip::Attachment.new(:avatar, FakeModel.new, options)
+end
+
+def silence_warnings
+ old_verbose, $VERBOSE = $VERBOSE, nil
+ yield
+ensure
+ $VERBOSE = old_verbose
end