Sha256: 076ada56ba4dd5159940595b65df7ccfaab3f973da6e8439476167bed988834e

Contents?: true

Size: 955 Bytes

Versions: 18

Compression:

Stored size: 955 Bytes

Contents

root = File.expand_path("#{File.dirname(__FILE__)}/../..")
Dir.chdir("#{root}/test")
$LOAD_PATH.unshift("#{root}/lib", "#{root}/ext")
require 'yaml'

begin
	CONFIG = YAML::load_file('config.yml')
rescue Errno::ENOENT
	STDERR.puts "*** You do not have the file test/config.yml. " <<
		"Please copy test/config.yml.example to " <<
		"test/config.yml, and edit it."
	exit 1
end

require 'fileutils'
require 'phusion_passenger/utils'

# Calculate location of the temp dir and cache it.
PhusionPassenger::Utils.passenger_tmpdir

# Seed the pseudo-random number generator here
# so that it doesn't happen in the child processes.
srand

Spec::Runner.configure do |config|
	config.append_before do
		# Create the temp directory.
		PhusionPassenger::Utils.passenger_tmpdir
	end
	
	config.append_after do
		tmpdir = PhusionPassenger::Utils.passenger_tmpdir(false)
		if File.exist?(tmpdir)
			FileUtils.chmod_R(0777, tmpdir)
			FileUtils.rm_rf(tmpdir)
		end
	end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
vanity-1.7.1 vendor/ruby/1.9.1/gems/passenger-2.2.15/test/support/config.rb
passenger-2.2.15 test/support/config.rb
passenger-2.2.14 test/support/config.rb
passenger-2.2.13 test/support/config.rb
passenger-2.2.12 test/support/config.rb
colouringcode-passenger-0.2 test/support/config.rb
passenger-2.2.11 test/support/config.rb
passenger-jmazzi-2.2.10 test/support/config.rb
passenger-2.2.10 test/support/config.rb
passenger-jmazzi-2.2.9 test/support/config.rb
passenger-2.2.9 test/support/config.rb
passenger-2.2.8 test/support/config.rb
colouringcode-passenger-0.1 test/support/config.rb
passenger-2.2.7 test/support/config.rb
passenger-2.2.6 test/support/config.rb
passenger-2.2.5 test/support/config.rb
passenger-2.2.3 test/support/config.rb
passenger-2.2.4 test/support/config.rb