Created
March 22, 2017 14:25
-
-
Save domcleal/3444b61b89f8200e83a60b0f15d426e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
end | |
require "action_dispatch" | |
require "action_dispatch/http/parameters" | |
require "minitest/autorun" | |
require "rack/test" | |
class BugTest < Minitest::Test | |
def test_catches_parseerror | |
begin | |
new_parseerror | |
assert false, "should have raised ParseError" | |
rescue ActionDispatch::ParamsParser::ParseError | |
assert true, "caught ParseError" | |
end | |
end | |
private | |
def new_parseerror | |
1/0 | |
rescue | |
raise ActionDispatch::ParamsParser::ParseError.new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment