Sha256: 0e8a2493e67acf0b3b932ce942593be240eb874f8c1b9d98e667bcd2455b4564

Contents?: true

Size: 828 Bytes

Versions: 27

Compression:

Stored size: 828 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

module PhusionPassenger

shared_examples_for "a spawner that does not preload app code" do
	specify "the starting_worker_process event is called with forked=false" do
		after_start %q{
			history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
			PhusionPassenger.on_event(:starting_worker_process) do |forked|
				::File.append(history_file, "forked = #{forked}\n")
			end
			::File.append(history_file, "end of environment.rb\n");
		}
		
		spawn_some_application
		spawn_some_application
		
		history_file = "#{PhusionPassenger::Utils.passenger_tmpdir}/history.txt"
		eventually do
			contents = File.read(history_file)
			lines = contents.split("\n")
			lines.count("forked = false") == 2
		end
	end
end

end # module PhusionPassenger

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
passenger-3.0.21 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.19 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.18 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.17 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.15 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.14 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.13 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.12 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
yspassenger-3.0.12 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.11 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.10 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.9 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.8 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.7 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.6 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.5 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.4 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.3 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
railsware-passenger-3.0.2.1 test/ruby/shared/spawners/non_preloading_spawner_spec.rb
passenger-3.0.2 test/ruby/shared/spawners/non_preloading_spawner_spec.rb