Sha256: c4f0ad76381807c442b96cadb2a4443f41cbb7739b9e9d149ee12f9c42cd68e7
Contents?: true
Size: 628 Bytes
Versions: 9
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' require 'mspec/guards' require 'mspec/helpers' describe ScratchPad do it "records an object and returns a previously recorded object" do ScratchPad.record :this ScratchPad.recorded.should == :this end it "clears the recorded object" do ScratchPad.record :that ScratchPad.recorded.should == :that ScratchPad.clear ScratchPad.recorded.should == nil end it "provides a convenience shortcut to append to a previously recorded object" do ScratchPad.record [] ScratchPad << :new ScratchPad << :another ScratchPad.recorded.should == [:new, :another] end end
Version data entries
9 entries across 9 versions & 1 rubygems