spec/lib/highlight_spec.rb in jackb-0.0.5 vs spec/lib/highlight_spec.rb in jackb-0.0.6.beta
- old
+ new
@@ -1,15 +1,15 @@
require 'spec_helper'
describe Jackb::Highlight do
describe 'code highlighting' do
it 'should highlight the code' do
- Jackb::Highlight.render('<pre><code><%= "test" %></code></pre>').should eql(Albino.new('<%= "test" %>', :ruby).to_s)
+ Jackb::Highlight.render('<pre><code><%= "test" %></code></pre>').should eql(Albino.new('<%= "test" %>', :ruby).to_s + "\n")
end
it 'should highlight the code in an other language' do
- Jackb::Highlight.render('<pre><code language="python"><%= "test" %></code></pre>').should eql(Albino.new('<%= "test" %>', :python).to_s)
+ Jackb::Highlight.render('<pre><code language="python"><%= "test" %></code></pre>').should eql(Albino.new('<%= "test" %>', :python).to_s + "\n")
end
describe 'unescape' do
it 'should unescape the <' do
Jackb::Highlight.new.send(:unescape, 'hey<').should eql('hey<')
@@ -31,6 +31,6 @@
it 'should get the default language' do
Jackb::Highlight.new.send(:extract_lang, '').should eql(:ruby)
end
end
end
-end
\ No newline at end of file
+end