spec/lib/algebra/formula_spec.rb in dydx-0.0.2 vs spec/lib/algebra/formula_spec.rb in dydx-0.0.3
- old
+ new
@@ -63,6 +63,12 @@
let(:d1){ db/dx }
let(:d2){ d/dx($b) }
it{ expect(d1.to_s).to eq('( ( x * 2 ) * ( x ^ ( ( x * 2 ) - 1 ) ) )') }
it{ expect(d2.to_s).to eq('( ( x * 2 ) * ( x ^ ( ( x * 2 ) - 1 ) ) )') }
end
+
+ $c = (:t ^ 2) / 2
+ let(:d1){ dc/dt }
+ let(:d2){ d/dt($c) }
+ it{ expect(d1.to_s).to eq('t') }
+ it{ expect(d2.to_s).to eq('t') }
end
\ No newline at end of file