Skip to content
Browse files

Remove trailing whitespace

  • Loading branch information...
1 parent 85a7051 commit 7c5a9b8f6be03b0b52914259773e8873750a6f49 @manveru manveru committed Jun 9, 2010
Showing with 7 additions and 7 deletions.
  1. +7 −7 test/spec_rack_builder.rb
View
14 test/spec_rack_builder.rb
@@ -9,7 +9,7 @@
context "Rack::Builder" do
specify "supports mapping" do
app = Rack::Builder.new do
- map '/' do |env|
+ map '/' do |env|
run lambda { |env| [200, {}, ['root']] }
end
map '/sub' do
@@ -19,7 +19,7 @@
Rack::MockRequest.new(app).get("/").body.to_s.should.equal 'root'
Rack::MockRequest.new(app).get("/sub").body.to_s.should.equal 'sub'
end
-
+
specify "doesnt dupe env even when mapping" do
class NothingMiddleware
def initialize(app)
@@ -36,17 +36,17 @@ def self.env
end
app = Rack::Builder.new do
use NothingMiddleware
- map '/' do |env|
- run lambda { |env|
+ map '/' do |env|
+ run lambda { |env|
env['new_key'] = 'new_value'
- [200, {}, ['root']]
+ [200, {}, ['root']]
}
end
end.to_app
Rack::MockRequest.new(app).get("/").body.to_s.should.equal 'root'
NothingMiddleware.env['new_key'].should.equal 'new_value'
end
-
+
specify "chains apps by default" do
app = Rack::Builder.new do
use Rack::ShowExceptions
@@ -84,7 +84,7 @@ def self.env
response.status.should.equal 401
# with auth...
- response = Rack::MockRequest.new(app).get("/",
+ response = Rack::MockRequest.new(app).get("/",
'HTTP_AUTHORIZATION' => 'Basic ' + ["joe:secret"].pack("m*"))
response.status.should.equal 200
response.body.to_s.should.equal 'Hi Boss'

0 comments on commit 7c5a9b8

Please sign in to comment.
Something went wrong with that request. Please try again.