# frozen_string_literal: true
require_relative "../test_helper"
module Parser
class ParserOptionsTest < Minitest::Spec
include SnapshotUtils
test "html is on by default" do
options = Herb::ParserOptions.new
assert_equal true, options.html
assert_equal true, options.to_h[:html]
assert_equal true, Herb.parse("bold").options.html
end
test "html false reaches the parse result" do
options = Herb::ParserOptions.new(html: false)
assert_equal false, options.html
assert_equal false, options.to_h[:html]
assert_snapshot_matches(options.inspect, "Herb::ParserOptions.new(html: false)")
result = Herb.parse("a