require "spec_helper"
require "pricecut"

describe Pricecut::Elements::H3 do
  let(:visitor) { Pricecut::MarkdownVisitor.new }

  let(:root) do
    parse %<<h3>Heading</h3>>
  end

  subject { described_class.new(visitor, root) }

  describe "#output!" do
    it "appends a Markdown header with newline to the output" do
       subject.output!

       visitor.output.should eq("### Heading ###\n")
    end
  end
end