Sha256: 90a1c040e8352cd7915715e432c722e6f38eb60f139fa9a74957430c6161c0fb
Contents?: true
Size: 539 Bytes
Versions: 24
Compression:
Stored size: 539 Bytes
Contents
require 'test/spec' require 'rack/mock' require 'rack/contrib/config' context "Rack::Config" do specify "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
Version data entries
24 entries across 24 versions & 8 rubygems