diff --git a/test/html5/test_nokogumbo.rb b/test/html5/test_nokogumbo.rb index e2e4d037d46..01524020fa3 100644 --- a/test/html5/test_nokogumbo.rb +++ b/test/html5/test_nokogumbo.rb @@ -340,6 +340,15 @@ def test_line_cdata assert_equal(expected, frag.at_css("div").children.map(&:type)) end + it "raises an exception if an unexpected kwarg is provided" do + assert_raises(ArgumentError) do + Nokogiri::HTML5::Document.parse("

", foo: "bar") + end + assert_raises(ArgumentError) do + Nokogiri::HTML5::DocumentFragment.parse("

", Encoding::UTF_8, foo: "bar") + end + end + private def buffer