spec/citeproc/ruby/renderer/text_spec.rb in citeproc-ruby-1.0.0 vs spec/citeproc/ruby/renderer/text_spec.rb in citeproc-ruby-1.0.1

- old
+ new

@@ -56,18 +56,23 @@ end describe 'when the form attribute is set to :short' do before(:each) { item.data.title = 'the full title' - node[:form] = :short + node[:form] = 'short' } it "prefers the short version if available" do item.data.title_short = 'the short title' renderer.render_text(item, node).should == 'the short title' end it "falls back to the variable if unavailable" do + renderer.render_text(item, node).should == 'the full title' + end + + it "falls back to the long form if the short form variable is not present" do + node[:variable] = 'title-short' renderer.render_text(item, node).should == 'the full title' end end end