Sha256: 8d22a4dca30db648140ff7ca0102ad0a2fab945ee64549598e410b72147d7d6e
Contents?: true
Size: 1016 Bytes
Versions: 3
Compression:
Stored size: 1016 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Danica::Function::Name do let(:x) { Danica::Wrapper::Variable.new(name: :x, latex: '\mu', gnuplot: 'u') } let(:subject) { described_class.new(name: :f, variables: [x]) } it_behaves_like 'an object that respond to basic_methods' describe '#to_tex' do it 'returns the name of the function with tex variables' do expect(subject.to_tex).to eq('f(\mu)') end context 'when initializing variables from scratch' do let(:x) { :x } it 'returns the name of the function with tex variables' do expect(subject.to_tex).to eq('f(x)') end end end describe '#to_gnu' do it 'returns the name of the function with tex variables' do expect(subject.to_gnu).to eq('f(u)') end context 'when initializing variables from scratch' do let(:x) { :x } it 'returns the name of the function with tex variables' do expect(subject.to_gnu).to eq('f(x)') end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
danica-2.7.7 | spec/lib/danica/function/name_spec.rb |
danica-2.7.6 | spec/lib/danica/function/name_spec.rb |
danica-2.7.5 | spec/lib/danica/function/name_spec.rb |