Sha256: e71ccd001dda869b3d01702a41eb68cde6c9372e5560f0c30132d981135b4a6f

Contents?: true

Size: 505 Bytes

Versions: 5

Compression:

Stored size: 505 Bytes

Contents

require 'spec_helper'

describe 'integration of power' do
  describe 'of sums' do
    subject do
      Danica::Power.new(
        Danica::Sum.new(3, 4),
        Danica::Sum.new(5, 6)
      )
    end

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

    describe '#to_tex' do
      it 'returns the correct string' do
        expect(subject.to_tex).to eq('\left(3 + 4\right)^{5 + 6}')
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
danica-2.2.1 spec/integration/power_spec.rb
danica-2.2.0 spec/integration/power_spec.rb
danica-2.1.1 spec/integration/power_spec.rb
danica-2.1.0 spec/integration/power_spec.rb
danica-2.0.6 spec/integration/power_spec.rb