Sha256: 72469f595e818fa4bbb833abff9ae8ad74c686dab1f5e42465b20a44ca86e7bf
Contents?: true
Size: 976 Bytes
Versions: 3
Compression:
Stored size: 976 Bytes
Contents
shared_examples_for "a minimal spawner" do it "can spawn our stub application" do use_rails_stub('foobar') do |stub| app = spawn_stub_application(stub) app.pid.should_not == 0 app.app_root.should_not be_nil app.close end end it "can spawn an arbitary number of applications" do use_rails_stub('foobar') do |stub| last_pid = 0 4.times do app = spawn_stub_application(stub) app.pid.should_not == last_pid app.app_root.should_not be_nil last_pid = app.pid app.close end end end it "respects ENV['RAILS_ENV']= in environment.rb" do use_rails_stub('foobar') do |stub| File.prepend(stub.environment_rb, "ENV['RAILS_ENV'] = 'development'\n") File.append(stub.environment_rb, %q{ File.open('environment.txt', 'w') do |f| f.write(RAILS_ENV) end }) spawn_stub_application(stub).close environment = File.read("#{stub.app_root}/environment.txt") environment.should == "development" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
passenger-2.0.1 | test/ruby/rails/minimal_spawner_spec.rb |
passenger-2.0.3 | test/ruby/rails/minimal_spawner_spec.rb |
passenger-2.0.2 | test/ruby/rails/minimal_spawner_spec.rb |