Sha256: da1248570e4608074063170ec74a0a6b87c618741462b93bffe362741263a4da
Contents?: true
Size: 632 Bytes
Versions: 2
Compression:
Stored size: 632 Bytes
Contents
require 'spec_helper' describe Danica::Equation do let(:left) do Danica::Expression.create(:y) { y } end let(:right) do Danica::Expression.create(:x) { x ** 2 } end subject { described_class.new(left, right) } describe '#to_f' do it do expect { subject.to_f }.to raise_error(Danica::Exception::NotImplemented) end end describe '#to_tex' do it 'joins the expressions in a equation' do expect(subject.to_tex).to eq('y = x^{2}') end end describe '#to_gnu' do it 'joins the expressions in a equation' do expect(subject.to_gnu).to eq('y = x**(2)') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
danica-2.5.1 | spec/lib/danica/equation_spec.rb |
danica-2.5.0 | spec/lib/danica/equation_spec.rb |