Sha256: f8216fb7aef2eaca3ceed6cfbfea6ee3523394ef28ba861fe96cb5014bf245ca

Contents?: true

Size: 710 Bytes

Versions: 12

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'

describe TP::SlideFactory do
  describe ".from_markdown" do
    subject(:from_markdown) { klass.from_markdown markdown }

    context "with only a header" do
      let(:markdown) { "# Header" }

      it { should be_a TP::Slide::HeaderOnly }
    end

    context "with a paragraph" do
      let(:markdown) { "# Paragraph\n\nThis is a paragraph" }

      it { should be_a TP::Slide::Paragraph }
    end

    context "with bullets" do
      let(:markdown) { "# Bullets\n\n* Bullet" }

      it { should be_a TP::Slide::Bulleted }
    end

    context "with a code block" do
      let(:markdown) { "# Code\n\n```rb\n:test\n```" }

      it { should be_a TP::Slide::Code }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tp-0.7.0 spec/lib/tp/slide_factory_spec.rb
tp-0.7.0pre2 spec/lib/tp/slide_factory_spec.rb
tp-0.7.0pre1 spec/lib/tp/slide_factory_spec.rb
tp-0.6.2 spec/lib/tp/slide_factory_spec.rb
tp-0.6.2pre2 spec/lib/tp/slide_factory_spec.rb
tp-0.6.2pre1 spec/lib/tp/slide_factory_spec.rb
tp-0.6.1 spec/lib/tp/slide_factory_spec.rb
tp-0.6.0 spec/lib/tp/slide_factory_spec.rb
tp-0.5.1 spec/lib/tp/slide_factory_spec.rb
tp-0.5.0 spec/lib/tp/slide_factory_spec.rb
tp-0.4.1 spec/lib/tp/slide_factory_spec.rb
tp-0.4.0 spec/lib/tp/slide_factory_spec.rb