require 'spec_helper' describe Rtml::Test::Simulator do context "with a receipt" do subject { Rtml::Test::Simulator.new(File.join(File.dirname(__FILE__), '../../../../support/raw_tml/receipt.tml')) } it "should clear the receipt buffer" do subject.press(:enter) subject.receipt.clear subject.receipt.should be_blank end it "should assign the printer output to the receipt" do subject.press(:enter) subject.receipt.strip.should == "

This is printed content.

" end end end