require "spec_helper" require "pricecut" describe Pricecut::Elements::Text do let(:visitor) { Pricecut::MarkdownVisitor.new } let(:root) do parse %<\n\nText.\n\n> end subject { described_class.new(visitor, root) } describe "#output!" do it "appends the whitespace-stripped text to the output" do subject.output! visitor.output.should eq("Text.") end end end