Sha256: ebeb590d5ac63654b9dca4199aebd59f6dedc7e5426ac507f2c0919114663348

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

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

require 'rack/test'
require 'useless/doc/rack/ui'

describe Useless::Doc::Rack::UI do
  include Rack::Test::Methods

  def app
    @app ||= begin
      base_app = lambda do |env|
        [200, {'Content-Type' => 'text/plain'}, [env['useless.doc.ui'].class.name]]
      end

      Useless::Doc::Rack::UI.new(base_app)
    end
  end

  it 'should always return `UI::Godel`' do
    get 'http://some-api.doc.granmal.com/some/resource'
    last_response.body.should == 'Useless::Doc::UI::Godel'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
useless-doc-0.4.0 spec/useless/doc/rack/ui_spec.rb
useless-doc-0.3.1 spec/useless/doc/rack/ui_spec.rb
useless-doc-0.3.0 spec/useless/doc/rack/ui_spec.rb