diff --git a/Rakefile b/Rakefile index 2849894..50aba6b 100644 --- a/Rakefile +++ b/Rakefile @@ -18,6 +18,7 @@ rescue LoadError puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler -s http://gems.github.com" end +begin require 'rake' require 'spec/rake/spectask' @@ -33,3 +34,6 @@ Spec::Rake::SpecTask.new('spec') do |t| t.spec_files = FileList['spec/'] t.spec_opts << '--options' << 'spec/spec.opts' end \ No newline at end of file +rescue LoadError + puts "RSpec, or one of its dependencies, is not available. Install it with: sudo gem install rspec" +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b68e348..952531a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,5 +3,13 @@ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') require 'rubygems' require 'yajl' -require 'active_support/core_ext/kernel/reporting' require 'date' + +module Kernel + def silence_warnings + old_verbose, $VERBOSE = $VERBOSE, nil + yield + ensure + $VERBOSE = old_verbose + end +end