Sha256: 3d3bca631a632bd27d7ab265221473cd44b1dc84245ac9e2dd3632fbf0f3ab48
Contents?: true
Size: 875 Bytes
Versions: 3
Compression:
Stored size: 875 Bytes
Contents
require 'spec_helper' describe Octopress::Codefence do let(:render) { Proc.new { |str| Octopress::Codefence.new(str).render } } context "when converting a code block with surrounding text" do let(:content) do str = <<-EOF whatever ``` ruby puts awesome unless lame ``` something EOF end it "converts the code fence" do expect(render.call(content)).to include("<figure class='code'><div class='highlight'><table><tr><td class='line-numbers' aria-hidden='true'><pre><div data-line='0' class='line-number'></div></pre></td><td class='main plain'><pre><div class='line'>puts awesome unless lame</div></pre></td></tr></table></div></figure>") end it "doesn't touch the other text" do expect(render.call(content)).to include("\nwhatever\n\n") expect(render.call(content)).to include("\n\n\nsomething\n\n") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
octopress-codefence-1.2.1 | spec/octopress-codefence_spec.rb |
octopress-codefence-1.2.0 | spec/octopress-codefence_spec.rb |
octopress-codefence-1.1.0 | spec/octopress-codefence_spec.rb |