spec/lib/danica/function_spec.rb in danica-2.6.4 vs spec/lib/danica/function_spec.rb in danica-2.7.1

- old
+ new

@@ -1,8 +1,10 @@ require 'spec_helper' shared_examples 'a generically generated function' do + it_behaves_like 'an object that respond to basic_methods' + it 'returns a function class' do expect(function.class.superclass).to eq(described_class) end it 'returns a class whose instance responds to the variables' do @@ -190,11 +192,11 @@ expect(function.to_tex).to eq('f(y) = \pi^{y}') end context 'from a hash' do let(:function) do - function_class.new(name: :f, x: { latex: '\pi', gnu: 'pi', value: 3.14 }) + function_class.new(name: :f, x: { latex: '\pi', gnuplot: 'pi', value: 3.14 }) end it 'ignores the constant in the definition' do expect(function.to_tex).to eq('f(y) = \pi^{y}') end @@ -242,10 +244,10 @@ expect(function.to_gnu).to eq('f(y) = pi**(y)') end context 'from a hash' do let(:function) do - function_class.new(name: :f, x: { latex: '\pi', gnu: 'pi', value: 3.14 }) + function_class.new(name: :f, x: { latex: '\pi', gnuplot: 'pi', value: 3.14 }) end it 'ignores the constant in the definition' do expect(function.to_gnu).to eq('f(y) = pi**(y)') end