Sha256: 9745fdb8f48cee9b7a479eb33b8513a3afc62cc408a03c300a3f4c95b5afa722
Contents?: true
Size: 759 Bytes
Versions: 3
Compression:
Stored size: 759 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Danica::Expression::Baskara do describe '#to_tex' do it 'returns bascara tex string' do expect(subject.to_tex).to eq('\frac{-b \pm \sqrt{b^{2} -4 \cdot a \cdot c}}{2 \cdot a}') end end end describe Danica::Expression do subject { clazz.new } let(:clazz) do described_class.build(:a, :b, :c) do ( negative(b) + Danica::Wrapper::PlusMinus.new( squared_root( power(b, 2) - multiplication(4, a, c) ) ) ) / (number(2) * a) end end describe 'to_tex' do it 'returns bascara tex string' do expect(subject.to_tex).to eq('\frac{-b \pm \sqrt{b^{2} -4 \cdot a \cdot c}}{2 \cdot a}') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
danica-2.7.7 | spec/integration/readme/expression_spec.rb |
danica-2.7.6 | spec/integration/readme/expression_spec.rb |
danica-2.7.5 | spec/integration/readme/expression_spec.rb |