spec/lib/danica/function_spec.rb in danica-1.2.0 vs spec/lib/danica/function_spec.rb in danica-2.0.0
- old
+ new
@@ -1,10 +1,10 @@
require 'spec_helper'
describe Danica::Function do
- class Danica::Function
- class Spatial < Danica::Function
+ module Danica
+ class Function::Spatial < Function
variables :time, :acceleration, :initial_space, :initial_velocity
delegate :to_f, :to_tex, :to_gnu, to: :sum
private
@@ -44,20 +44,20 @@
end
let(:subject) { described_class::Spatial.new(variables) }
describe '#to_tex' do
- context 'when creating the spatial function for constantly accelerated movement' do
+ context 'when creating the spatial operator for constantly accelerated movement' do
let(:expected) { 'S_0 + V_0 \cdot t + \frac{a \cdot t^{2}}{2}' }
it 'return the latex format CAM' do
expect(subject.to_tex).to eq(expected)
end
end
end
describe '#to_gnu' do
- context 'when creating the spatial function for constantly accelerated movement' do
+ context 'when creating the spatial operator for constantly accelerated movement' do
let(:expected) { 'S0 + V0 * t + a * t**2/2' }
it 'return the latex format CAM' do
expect(subject.to_gnu).to eq(expected)
end