spec/lib/danica/function_spec.rb in danica-2.2.1 vs spec/lib/danica/function_spec.rb in danica-2.3.0

- old
+ new

@@ -3,11 +3,11 @@ describe Danica::Function do describe '.build' do let(:variables) { %i(x y) } let(:function_class) do described_class.build(*variables) do - Danica::Power.new(x, y) + Danica::Operator::Power.new(x, y) end end let(:function) do function_class.new end @@ -127,18 +127,18 @@ end describe '#variables_hash' do let(:expected) do { - time: Danica::Variable.new(name: :t), - acceleration: Danica::Variable.new(name: 'a'), - initial_space: Danica::Variable.new( name: :S0, latex: 'S_0' ), - initial_velocity: Danica::Variable.new( name: :V0, latex: 'V_0' ) + time: Danica::Wrapper::Variable.new(name: :t), + acceleration: Danica::Wrapper::Variable.new(name: 'a'), + initial_space: Danica::Wrapper::Variable.new( name: :S0, latex: 'S_0' ), + initial_velocity: Danica::Wrapper::Variable.new( name: :V0, latex: 'V_0' ) } end - context 'when variables are already wrapped with DanicaVariable' do + context 'when variables are already wrapped with Danica::Wrapper::Variable' do let(:variables) { expected } it 'returns a hash with the variabels' do expect(subject.variables_hash).to eq(expected) end end @@ -160,11 +160,11 @@ end context 'when changing a variable' do before do subject.time = :x - expected[:time] = Danica::Variable.new(name: :x) + expected[:time] = Danica::Wrapper::Variable.new(name: :x) end it do expect(subject.variables_hash).to eq(expected) end @@ -213,10 +213,10 @@ end end context 'when not initializing all variables' do subject { described_class::Spatial.new } - let(:time) { Danica::Variable.new(name: :t) } + let(:time) { Danica::Wrapper::Variable.new(name: :t) } context 'when initialized with an empty variable set' do it do expect(subject.variables.compact).to be_empty end