Sha256: 2e2df511aea4fa6a014e03b90c5eac5a9ea6fb45b30934d3faa6758caf16b5b9
Contents?: true
Size: 544 Bytes
Versions: 167
Compression:
Stored size: 544 Bytes
Contents
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::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
167 entries across 145 versions & 41 rubygems