Skip to content

Commit

Permalink
Update tests to pass with commonmarker 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Dec 18, 2024
1 parent a29d5fb commit 51fb6fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/tilt_commonmarkertemplate_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
checked_describe 'tilt/commonmarker' do
it "preparing and evaluating templates on #render" do
template = Tilt::CommonMarkerTemplate.new { |t| "# Hello World!" }
assert_equal "<h1>Hello World!</h1>\n", template.render
res = template.render
assert_includes ["<h1>Hello World!</h1>\n", "<h1><a href=\"#hello-world\" aria-hidden=\"true\" class=\"anchor\" id=\"hello-world\"></a>Hello World!</h1>\n"], template.render
end

it "can be rendered more than once" do
template = Tilt::CommonMarkerTemplate.new { |t| "# Hello World!" }
3.times { assert_equal "<h1>Hello World!</h1>\n", template.render }
3.times do
res = template.render
assert_includes ["<h1>Hello World!</h1>\n", "<h1><a href=\"#hello-world\" aria-hidden=\"true\" class=\"anchor\" id=\"hello-world\"></a>Hello World!</h1>\n"], template.render
end
end

it "smartypants when :smartypants is set" do
Expand Down

0 comments on commit 51fb6fd

Please sign in to comment.