Sha256: 5fa4db360a21d50af1af24e8c4665047c1ee22abdd8b5632b3914e8603664cc6
Contents?: true
Size: 993 Bytes
Versions: 1
Compression:
Stored size: 993 Bytes
Contents
require 'spec_helper' def render(text) Slodown::Formatter.new(text).complete.to_s end describe 'basic formatting syntax' do it "converts a block-level image to a <figure> structure" do expect(render %[check it out:\n\n![image](image.jpg "Cute Kitten!")]) .to eq %[<p>check it out:</p>\n\n<figure><img src="image.jpg" alt="image" title="Cute Kitten!"><figcaption>Cute Kitten!</figcaption></figure>\n] end it "doesn't affect OEmbed-enabled embeds" do expect(render %[check it out:\n\n![video](https://www.youtube.com/watch?v=KilehMXMxo0)]) .to eq %[<p>check it out:</p>\n\n<div class="embedded video youtube"><iframe width="480" height="270" src="https://www.youtube.com/embed/KilehMXMxo0?feature=oembed" frameborder="0" allowfullscreen=""></iframe></div>] end it "doesn't affect inline images" do expect(render %[here's an inline image: ![image](image.jpg)]) .to eq %[<p>here’s an inline image: <img src="image.jpg" alt="image"></p>\n] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slodown-0.4.0 | spec/image_figures_spec.rb |