Updates
SVG-Edit -> 2.5final Vendored Rack -> 1.2.1
This commit is contained in:
parent
6338a3bcb2
commit
0d8f680d4f
82 changed files with 138 additions and 70 deletions
23
vendor/plugins/rack/test/spec_config.rb
vendored
Normal file
23
vendor/plugins/rack/test/spec_config.rb
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
require 'rack/builder'
|
||||
require 'rack/config'
|
||||
require 'rack/content_length'
|
||||
require 'rack/lint'
|
||||
require 'rack/mock'
|
||||
|
||||
describe Rack::Config do
|
||||
should "accept a block that modifies the environment" do
|
||||
app = Rack::Builder.new do
|
||||
use Rack::Lint
|
||||
use Rack::ContentLength
|
||||
use Rack::Config do |env|
|
||||
env['greeting'] = 'hello'
|
||||
end
|
||||
run lambda { |env|
|
||||
[200, {'Content-Type' => 'text/plain'}, [env['greeting'] || '']]
|
||||
}
|
||||
end
|
||||
|
||||
response = Rack::MockRequest.new(app).get('/')
|
||||
response.body.should.equal('hello')
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue