Skip to content

Commit

Permalink
Move redcloth tests into redcloth integration file
Browse files Browse the repository at this point in the history
  • Loading branch information
lsegal committed Jan 8, 2020
1 parent c397187 commit ee3469e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 0 additions & 10 deletions spec/templates/helpers/html_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,6 @@ def options
end

describe "#htmlify" do
it "does not use hard breaks for textile markup (RedCloth specific)" do
begin; require 'redcloth'; rescue LoadError; pending 'test requires redcloth gem' end
expect(htmlify("A\nB", :textile)).not_to include("<br")
end

it "uses hard breaks for textile_strict markup (RedCloth specific)" do
begin; require 'redcloth'; rescue LoadError; pending 'test requires redcloth gem' end
expect(htmlify("A\nB", :textile_strict)).to include("<br")
end

it "handles various encodings" do
allow(self).to receive(:object).and_return(Registry.root)
text = String.new("\xB0\xB1")
Expand Down
8 changes: 8 additions & 0 deletions spec/templates/markup_processor_integrations/redcloth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@
it 'renders pre. block, and applies Ruby syntax highlight' do
expect(rendered_document).to match(highlighted_ruby_regexp('x', '=', '2'))
end

it "does not use hard breaks for newlines" do
expect(html_renderer.htmlify("A\nB", :textile)).not_to include("<br")
end

it "uses hard breaks for newlines with textile_strict" do
expect(html_renderer.htmlify("A\nB", :textile_strict)).to include("<br")
end
end

0 comments on commit ee3469e

Please sign in to comment.