Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
kakusuke committed Sep 21, 2014
1 parent 059836b commit 75bc7bb
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions spec/support/has_markdownable_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
describe attr_html do

where(:md, :html) do
'# title' | '<h1 id="title">title</h1>'
"```ruby\n<a>\n```" | /\A(?!<div class="code-filename">).*\Z/m
"```ruby:name.rb\n<a>\n```" | /<div class="code-filename">name\.rb/
"```ruby:name.rb\n<a>\n```" | /class="CodeRay".*<pre>&lt;a&gt;/m
"foo\nbar" | /foo<br>.*bar/m
[
['# title' , '<h1 id="title">title</h1>'],
["```ruby\n<a>\n```" , /\A(?!<div class="code-filename">).*\Z/m],
["```ruby:name.rb\n<a>\n```", /<div class="code-filename">name\.rb/],
["```ruby:name.rb\n<a>\n```", /class="CodeRay".*<pre>&lt;a&gt;/m],
["foo\nbar" , /foo<br>.*bar/m],
]
end

with_them do
Expand All @@ -25,8 +27,10 @@

describe attr_toc do
where(:md, :html) do
"# h1\n## h2" | /<li>.*h1.*<ul>.*<li>.*h2/m
"--no-toc\n#h1" | /\A\Z/m
[
["# h1\n## h2" , /<li>.*h1.*<ul>.*<li>.*h2/m],
["--no-toc\n#h1", /\A\Z/m],
]
end

with_them do
Expand Down

0 comments on commit 75bc7bb

Please sign in to comment.