Sha256: 661484004c2c2a21f6f54df2c6377c73b1a62517361f5203b075bec04fe0a3f3
Contents?: true
Size: 621 Bytes
Versions: 17
Compression:
Stored size: 621 Bytes
Contents
require 'spec_helper' describe Dydx::Algebra::Set::Pi do it{ expect(pi).to eq(pi) } describe '#to_s' do it{ expect(pi.to_s).to eq('pi') } end describe '#differentiate' do it{ expect(pi.d(:x).to_s).to eq(_(0).to_s) } end describe 'Calculate' do context 'With Fixnum' do it{ expect(pi + 0).to eq(pi) } it{ expect(pi - 0).to eq(pi) } it{ expect((pi * 0).to_s).to eq('0') } it{ expect(pi * 1).to eq(pi) } it{ expect{(pi / 0).to_s}.to raise_error(ZeroDivisionError) } it{ expect(pi / 1).to eq(pi) } it{ expect((pi ^ 0).to_s).to eq('1') } end end end
Version data entries
17 entries across 17 versions & 1 rubygems