require "spec_helper" require "pricecut" describe Pricecut::Elements::Img do let(:visitor) { Pricecut::MarkdownVisitor.new } let(:root) do parse %<Image> end subject { described_class.new(visitor, root) } describe "#output!" do it "appends a Markdown image to the output" do subject.output! visitor.output.should eq("![Image](image.png)") end end end