Permalink
Browse files

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

…ixing spec
  • Loading branch information...
winton committed Dec 7, 2009
1 parent 40b0fed commit 3cd7e15e7e37fc97933117aebd2385f60c9a1540
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/lilypad/hoptoad/notify.rb
  2. +1 −1 spec/lilypad/hoptoad/notify_spec.rb
@@ -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 = {}
@@ -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)

0 comments on commit 3cd7e15

Please sign in to comment.