Skip to content

Commit 1665480

Browse files
committed
Fix specs with mismatched arg calls
1 parent 65f5519 commit 1665480

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/rack/reverse_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module Rack
55
class ReverseProxy
66
def initialize(app = nil, &b)
7-
@app = app || lambda { [404, [], []] }
7+
@app = app || lambda {|env| [404, [], []] }
88
@matchers = []
99
@global_options = {:preserve_host => true, :matching => :all, :verify_ssl => true}
1010
instance_eval &b if block_given?

spec/rack/reverse_proxy_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ def app
99
end
1010

1111
def dummy_app
12-
lambda { [200, {}, ['Dummy App']] }
12+
lambda { |env| [200, {}, ['Dummy App']] }
1313
end
1414

1515
describe "as middleware" do
1616
def app
1717
Rack::ReverseProxy.new(dummy_app) do
1818
reverse_proxy '/test', 'http://example.com/', {:preserve_host => true}
19-
reverse_proxy '/2test', lambda{'http://example.com/'}
20-
19+
reverse_proxy '/2test', lambda{ |env| 'http://example.com/'}
2120
end
2221
end
2322

0 commit comments

Comments
 (0)