Sha256: 33cd402865f1e0133af21d6415dc6f8131a828ca3141c1bffe5514a988055cfc

Contents?: true

Size: 511 Bytes

Versions: 1

Compression:

Stored size: 511 Bytes

Contents

require "spec_helper"

describe BitPlayer::Slide do
  describe "#render_body" do
    let(:slide) { BitPlayer::Slide.new }

    it "should render a nil body" do
      expect(slide.render_body).to eq("")
    end

    it "should render markdown as html" do
      slide.body = "# header"

      expect(slide.render_body).to match(/<h1>header<\/h1>/)
    end

    it "should escape html" do
      slide.body = "<div>my content</div>"

      expect(slide.render_body).to match(/<p>my content<\/p>/)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bit_player-0.1.3 spec/models/bit_player/slide_spec.rb