spec/citeproc/ruby/renderer/history_spec.rb in citeproc-ruby-1.0.2 vs spec/citeproc/ruby/renderer/history_spec.rb in citeproc-ruby-1.0.3

- old
+ new

@@ -23,14 +23,23 @@ end it 'drops remembered items when they are too old' do lambda { history.update :store!, 'citation', { :x => 1 } - history.update :store!, 'citation', { :x => 1 } - history.update :store!, 'citation', { :x => 1 } - history.update :store!, 'citation', { :x => 1 } - history.update :store!, 'citation', { :x => 1 } + history.update :store!, 'citation', { :x => 2 } + history.update :store!, 'citation', { :x => 3 } + history.update :store!, 'citation', { :x => 4 } + history.update :store!, 'citation', { :x => 5 } }.should change { history.citation.length }.to(3) + end + end + + describe '#discard' do + it 'clears the history' do + history.update :store!, 'bibliography', { :x => 1 } + history.memory.should_not be_empty + history.discard + history.memory.should be_empty end end end end