Sha256: bbef4b4faa0d19a25d7f0d79e3b1357f9d5f8df090a6eee875f4896d928ef0a1
Contents?: true
Size: 630 Bytes
Versions: 11
Compression:
Stored size: 630 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' expect(last_response).to be_ok end it 'should run the app if file is not exist' do get '/index.rb' expect(last_response.status).to be 500 end it 'should run the app when post method' do post '/index.rb' expect(last_response.status).to be 500 end end end
Version data entries
11 entries across 11 versions & 1 rubygems