Sha256: 3ddab40b432893630355cb3fb1c3e564c3173b35d805a30fa00e1191a6255b39

Contents?: true

Size: 826 Bytes

Versions: 6

Compression:

Stored size: 826 Bytes

Contents

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

describe Merb::BootLoader::RackUpApplication do

  it "should default to rack config (rack.rb)" do
    options = {:merb_root => File.dirname(__FILE__) / 'fixture'}
    Merb::Config.setup(options)
    app = Merb::BootLoader::RackUpApplication.run
    app.class.should == Merb::Rack::Static
  end

  it "should use rackup config that we specified" do
    options = {:rackup => File.dirname(__FILE__) / 'fixture' / 'config' / 'black_hole.rb'}
    Merb::Config.setup(options)
    app = Merb::BootLoader::RackUpApplication.run
    app.class.should == Rack::Adapter::BlackHole

    env = Rack::MockRequest.env_for("/black_hole")
    status, header, body = app.call(env)
    status.should == 200
    header.should == { "Content-Type" => "text/plain" }
    body.should == ""
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
thorero-0.9.4.5 spec/private/dispatch/bootloader_spec.rb
merb-core-0.9.5 spec/private/dispatch/bootloader_spec.rb
merb-core-0.9.4 spec/private/dispatch/bootloader_spec.rb
merb-core-0.9.7 spec/private/dispatch/bootloader_spec.rb
merb-core-0.9.6 spec/private/dispatch/bootloader_spec.rb
thorero-core-0.9.4.6 spec/private/dispatch/bootloader_spec.rb