Sha256: 74adb7acc12f925703b04bb18daa55f20336c575837ec4313014455756b2aa83
Contents?: true
Size: 971 Bytes
Versions: 2
Compression:
Stored size: 971 Bytes
Contents
require 'rubygems' require 'test/unit' require 'shoulda' require 'mocha' require 'compass' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'soca' require 'soca/plugins/compass' require 'soca/plugins/credentials' class Test::Unit::TestCase def setup @log = StringIO.new Soca.logger = Logger.new(@log) @test_app_dir = File.expand_path(File.join(File.dirname(__FILE__), 'testapp')) + '/' @new_app_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp', 'newapp')) FileUtils.rm_rf(@new_app_dir) if File.directory?(@new_app_dir) FileUtils.mkdir_p(@new_app_dir) end # stolen from the thor specs def capture(stream) begin stream = stream.to_s eval "$#{stream} = StringIO.new" yield result = eval("$#{stream}").string ensure eval("$#{stream} = #{stream.upcase}") end result end alias :silence :capture end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
soca-0.3.3 | test/helper.rb |
soca-0.3.2 | test/helper.rb |