Sha256: 769322f2af58a0ab3988391cf82aa87951e437fdfe4152f85749310490ca25cb

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe Mdoc::Text do
  context "pandoc format" do
    subject(:mf) { Mdoc::Text.new('examples/pandoc.md') }

    its(:title) { should eq('Pandoc Title') }
    its(:author) { should eq('Author Like Me') }
    its(:date) { should eq('Date in Some Format') }
    its(:body) { should match('The first line of contents') }
    its(:body) { should match('The Third line of contents') }
    its(:body) { should eq("The first line of contents\r\n\r\nThe Third line of contents\r\n")}
  end

  context "original format" do
    subject(:mf) { Mdoc::Text.new('examples/original.md') }

    its(:title) { should eq('The title for our document') }
    its(:author) { should eq('unknown person') }
    its(:date) { should eq('2009-08-01') }
    its(:body) { should eq("\r\nThe content inside\r\n")}
  end

  context "multi-key format" do
    subject(:mf) { Mdoc::Text.new('examples/multikeys.md') }

    its(:title) { should eq('The title for our document') }
    its(:author) { should eq('unknown person') }
    its(:date) { should eq('2009-08-01') }
    its(:body) { should match("The content inside")}
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mdoc-0.0.3 spec/parser_spec.rb
mdoc-0.0.2 spec/parser_spec.rb
mdoc-0.0.1 spec/parser_spec.rb