Skip to content

Instantly share code, notes, and snippets.

@domcleal
Created March 22, 2017 14:21
Show Gist options
  • Save domcleal/39f0b159faf3eaadacdf1612ac6aea7a to your computer and use it in GitHub Desktop.
Save domcleal/39f0b159faf3eaadacdf1612ac6aea7a to your computer and use it in GitHub Desktop.
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
gem "arel", github: "rails/arel"
end
require "action_dispatch"
require "action_dispatch/http/parameters"
require "minitest/autorun"
require "rack/test"
class BugTest < Minitest::Test
def test_catches_parseerror
begin
raise ActionDispatch::ParamsParser::ParseError
rescue ActionDispatch::ParamsParser::ParseError
assert true, "caught ParseError"
end
assert false, "should have raised ParseError"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment