Sha256: 59eef836da148ca8204b7238df20cb9d340810e45ad1a326a226ef9e889e3bb2
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
$:.unshift("lib") require 'metadown' describe Metadown do let(:text) do text = <<-MARKDOWN --- key: "value" --- hello world MARKDOWN end it "provides a factory" do Metadown.render(text).tap do |data| data.should be_kind_of(Metadown::Data) data.metadata.should eql({"key" => "value"}) data.output.should eql("<p>hello world</p>\n") end end it "allows you to inject a parser" do parser = stub(:new => stub(:render => "wat")) Metadown.render(text, parser).tap do |data| data.should be_kind_of(Metadown::Data) data.metadata.should eql({"key" => "value"}) data.output.should eql("wat") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
metadown-1.1.0.beta | spec/metadown_spec.rb |