Sha256: c446acb0de9ed0cfd463622af016407b10efc35ba36c671ceecb36f6f63636a6

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 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.should_receive(:use).with(Rack::CommonLogger)
    kls.should_receive(:use).with(Rack::ShowExceptions)
    kls.run!
  end

  it 'should not include show exceptions middleware in production' do
    NYNY.env.stub :production? => true
    kls.should_receive(:use).with(Rack::CommonLogger)
    kls.should_not_receive(:use).with(Rack::ShowExceptions)
    kls.run!
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nyny-3.0.1 spec/runner_spec.rb