Sha256: 48648a6768022cb7c20afdd15b9168a8de30b6335e8f95f158854a2e04d654b7

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

require 'spec_helper'

describe Danica::Equation do
  subject do
    described_class.new.tap do |equation|
      equation.left = Danica.build(:x, :y) do
        x ** 2 + y ** 2
      end
      equation.right = Danica.build(:x, :z) do
        number(1) - z ** 2
      end
    end
  end

  describe '#to_gnu' do
    it 'generates the gnu format' do
      expect(subject.to_gnu).to eq('x**(2) + y**(2) = 1 -z**(2)')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danica-2.5.1 spec/integration/readme/equation_spec.rb