Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding rescue to Rack::Request.new.params since it can raise stuff, f…

…ixing spec
  • Loading branch information...
commit 3cd7e15e7e37fc97933117aebd2385f60c9a1540 1 parent 40b0fed
Winton Welsh authored
2  lib/lilypad/hoptoad/notify.rb
View
@@ -65,7 +65,7 @@ def parse
if @env
request = Rack::Request.new @env
- params = filter request.params
+ params = filter (request.params rescue {})
request_path = request.script_name + request.path_info
else
params = {}
2  spec/lilypad/hoptoad/notify_spec.rb
View
@@ -114,7 +114,7 @@
it "should return the correct parameters with an environment" do
request = mock(:request)
- request.stub!(:params).and_return {}
+ request.stub!(:params)
request.stub!(:script_name).and_return 'request_'
request.stub!(:path_info).and_return 'path'
Rack::Request.stub!(:new).and_return(request)
Please sign in to comment.
Something went wrong with that request. Please try again.