Sha256: b64554f0cf8a7a7ad47089fb7bebd36b062250fb14377b223e0d64498b0d5de0

Contents?: true

Size: 498 Bytes

Versions: 3

Compression:

Stored size: 498 Bytes

Contents

require 'spec_helper'

describe Runner do
  let (:kls) { mock_app_class {} }

  before do
    kls.optimal_runner.stub :run
  end

  it 'should include the default middleware on top' do
    kls.run!
    kls.middlewares.first.should == Rack::ShowExceptions
    kls.middlewares[1].should == Rack::CommonLogger
  end

  it 'should not include show exceptions middleware in production' do
    NYNY.env.stub :production? => true
    kls.run!
    kls.middlewares.should == [Rack::CommonLogger]
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nyny-2.2.1 spec/runner_spec.rb
nyny-2.1.1 spec/runner_spec.rb
nyny-2.1.0 spec/runner_spec.rb