Sha256: 03f32b8a5381abc8a9d2a117a77240587acf9141423faa8ba546395e2d460498
Contents?: true
Size: 909 Bytes
Versions: 14
Compression:
Stored size: 909 Bytes
Contents
#-- # (c) Copyright 2007-2008 Sun Microsystems, Inc. # See the file LICENSES.txt included with the distribution for # software license details. #++ require 'rubygems' require 'spec' $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib' require 'warbler' raise %{Error: detected running Warbler specs in a Rails app; Warbler specs are destructive to application directories.} if File.directory?("app") def silence(io = nil) require 'stringio' old_stdout = $stdout old_stderr = $stderr $stdout = io || StringIO.new $stderr = io || StringIO.new yield ensure $stdout = old_stdout $stderr = old_stderr end def capture(&block) require 'stringio' io = StringIO.new silence(io, &block) io.string end Spec::Runner.configure do |config| config.after(:each) do class << Object public :remove_const end Object.remove_const("Rails") rescue nil rm_rf "vendor" end end
Version data entries
14 entries across 14 versions & 7 rubygems