diff --git a/lib/rack/reverse_proxy_matcher.rb b/lib/rack/reverse_proxy_matcher.rb index 6afacba..7044580 100644 --- a/lib/rack/reverse_proxy_matcher.rb +++ b/lib/rack/reverse_proxy_matcher.rb @@ -1,6 +1,6 @@ module Rack class ReverseProxyMatcher - def initialize(matcher,url=nil,options) + def initialize(matcher, url=nil, options={}) @default_url=url @url=url @options=options diff --git a/spec/rack/reverse_proxy_spec.rb b/spec/rack/reverse_proxy_spec.rb index ea35a55..4753c7b 100644 --- a/spec/rack/reverse_proxy_spec.rb +++ b/spec/rack/reverse_proxy_spec.rb @@ -296,9 +296,9 @@ def app it "should proxy requests when a pattern is matched" do stub_request(:get, 'http://users-example.com/users?user=omer').to_return({:body => "User App"}) - get '/test', user: "mark" + get '/test', :user => "mark" last_response.body.should == "Dummy App" - get '/users', user: 'omer' + get '/users', :user => 'omer' last_response.body.should == "User App" end end