spec/integration/sum_spec.rb in danica-2.0.6 vs spec/integration/sum_spec.rb in danica-2.1.0

- old
+ new

@@ -1,21 +1,27 @@ require 'spec_helper' describe 'integration of sum' do - describe 'with negative numbers' do + describe 'with negative and positivenegative (+/-) numbers' do subject do - Danica::Sum.new(Danica::Negative.new(1), 2, Danica::Negative.new(3), 4) + Danica::Sum.new( + Danica::Negative.new(1), + 2, + Danica::Negative.new(3), + 4, + Danica::PositiveNegative.new(5) + ) end describe '#to_gnu' do it 'returns the correct string' do - expect(subject.to_gnu).to eq('-1 + 2 -3 + 4') + expect(subject.to_gnu).to eq('-1 + 2 -3 + 4 + 5') end end describe '#to_tex' do it 'returns the correct string' do - expect(subject.to_tex).to eq('-1 + 2 -3 + 4') + expect(subject.to_tex).to eq('-1 + 2 -3 + 4 \pm 5') end end end end