Sha256: 15e255c13bda1301382448bbc68bdfb98a459f0f0b29588a5dfed18210960926

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

require 'spec_helper'
require 'rack/test'
require 'tdiary/rack/static'

describe TDiary::Rack::Static do
	include Rack::Test::Methods

	describe "reserve static files" do
		let(:app) { TDiary::Rack::Static.new(
			lambda{|env| [500, {}, ['Internal Server Error']]}, 'doc')}

		it 'should return the file in static directory' do
			get '/README.md'
			last_response.should be_ok
		end

		it 'should run the app if file is not exist' do
			get '/index.rb'
			last_response.status.should be 500
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tdiary-3.2.2.20130614 spec/core/rack/static_spec.rb