spec/citeproc/ruby/renderer/choose_spec.rb in citeproc-ruby-1.1.1 vs spec/citeproc/ruby/renderer/choose_spec.rb in citeproc-ruby-1.1.2

- old
+ new

@@ -8,11 +8,11 @@ let(:item) { i = CiteProc::CitationItem.new(:id => 'ID-1') i.data = CiteProc::Item.new(:id => 'ID-1') i } - + describe 'Renderer#render_choose' do let(:node) { CSL::Style::Choose.new } it 'returns an empty string by default' do expect(renderer.render(item, node)).to eq('') @@ -63,11 +63,11 @@ expect(renderer.evaluates?(item, node)).to be_truthy end it 'fails if there is an unknown condition type' do allow(node).to receive(:conditions).and_return([[:unknown, :all?, 'x']]) - expect { renderer.evaluates?(item, node) }.to raise_error + expect { renderer.evaluates?(item, node) }.to raise_error(RuntimeError) end it 'returns false for disambiguate (implementation pending)' do node[:disambiguate] = true expect(renderer.evaluates?(item, node)).to be_falsey @@ -81,10 +81,10 @@ describe 'for is-numeric conditions' do before { node[:'is-numeric'] = 'note archive' } it 'returns false unless all variables are numeric' do expect(renderer.evaluates?(item, node)).to be_falsey - + item.data[:archive] = 1 expect(renderer.evaluates?(item, node)).to be_falsey item.data[:note] = 'L2d' expect(renderer.evaluates?(item, node)).to be_truthy