Sha256: b55e83619a4abac7e522d441ff1a867805818f90e759e2d36d71ccd69c9b499a

Contents?: true

Size: 660 Bytes

Versions: 13

Compression:

Stored size: 660 Bytes

Contents

require 'spec_helper'

describe 'integration of addition' do
  describe 'with negative and positivenegative (+/-) numbers' do
    subject do
      Danica::Operator::Addition.new(
        Danica::Wrapper::Negative.new(1),
        2,
        -3,
        4,
        Danica::Wrapper::PlusMinus.new(5),
        Danica::Wrapper::Number.new(-6)
      )
    end

    describe '#to_gnu' do
      it 'returns the correct string' do
        expect(subject.to_gnu).to eq('-1 + 2 -3 + 4 + 5 -6')
      end
    end

    describe '#to_tex' do
      it 'returns the correct string' do
        expect(subject.to_tex).to eq('-1 + 2 -3 + 4 \pm 5 -6')
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
danica-2.7.4 spec/integration/addition_spec.rb
danica-2.7.3 spec/integration/addition_spec.rb
danica-2.7.2 spec/integration/addition_spec.rb
danica-2.7.1 spec/integration/addition_spec.rb
danica-2.6.4 spec/integration/addition_spec.rb
danica-2.6.3 spec/integration/addition_spec.rb
danica-2.6.2 spec/integration/addition_spec.rb
danica-2.6.1 spec/integration/addition_spec.rb
danica-2.6.0 spec/integration/addition_spec.rb
danica-2.5.1 spec/integration/addition_spec.rb
danica-2.5.0 spec/integration/addition_spec.rb
danica-2.4.4 spec/integration/addition_spec.rb
danica-2.4.3 spec/integration/addition_spec.rb