stub out errors from the formatter

since we've eliminated #block_code
This commit is contained in:
http://jneen.net/ 2016-06-21 13:08:24 -07:00
parent ca32a542d7
commit 2f0b29227d
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ describe Banzai::Filter::SyntaxHighlightFilter, lib: true do
end
it 'passes through invalid code blocks' do
allow_any_instance_of(described_class).to receive(:block_code).and_raise(StandardError)
allow_any_instance_of(Rouge::Formatter).to receive(:format).and_raise(StandardError)
result = filter('<pre><code>This is a test</code></pre>')
expect(result.to_html).to eq('<pre>This is a test</pre>')