diff options
Diffstat (limited to 'test/spec_builder.rb')
-rw-r--r-- | test/spec_builder.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/spec_builder.rb b/test/spec_builder.rb index 52bdf76c..6ca28477 100644 --- a/test/spec_builder.rb +++ b/test/spec_builder.rb @@ -34,6 +34,13 @@ describe Rack::Builder do Rack::Lint.new Rack::Builder.new(&block).to_app end + it "supports run with block" do + app = builder_to_app do + run {|env| [200, { "content-type" => "text/plain" }, ["OK"]]} + end + Rack::MockRequest.new(app).get("/").body.to_s.must_equal 'OK' + end + it "supports mapping" do app = builder_to_app do map '/' do |outer_env| |