Sha256: 740d72f811810153a074729cf6fe5f122545bc28889198ab680d46c923c03734
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' describe Jackb::Html do it 'should render the content from html to html' do format = Jackb::Html.new('My <strong>test</strong>') format.render.should eql('My <strong>test</strong>') end it 'should highlight the code' do Jackb::Html.new('[code language="ruby"]<%= "test" %>[/code]').render.should eql(Albino.new('<%= "test" %>', :ruby).to_s) end it 'should highlight multiple codes' do Jackb::Html.new('Some Text. [code language="ruby"]<%= "test" %>[/code]; some other text. [code language="python"]<%= "testing" %>[/code]'). render.should eql("Some Text. #{Albino.new('<%= "test" %>', :ruby).to_s}; some other text. #{Albino.new('<%= "testing" %>', :python).to_s}") end it 'should highlight multiple codes with new lines' do Jackb::Html.new("Some Text. [code language='ruby']<%= 'test' %>\n\n<%= 'second' %>[/code]; some other text. [code language='python']<%= 'testing' %>[/code]"). render.should eql("Some Text. #{Albino.new("<%= 'test' %>\n\n<%= 'second' %>", :ruby).to_s}; some other text. #{Albino.new("<%= 'testing' %>", :python).to_s}") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jackb-0.0.5 | spec/lib/html_spec.rb |
jackb-0.0.4 | spec/lib/html_spec.rb |