Sha256: a72a33f85d19d903d43dd6a46b1a91b728e107950692a1701dacf97b76897095
Contents?: true
Size: 602 Bytes
Versions: 1
Compression:
Stored size: 602 Bytes
Contents
require "spec_helper" describe Array do describe "#stdev" do subject { values.stdev } context "with integer values" do let(:values) { [1, 2, 6, 3, -4, 23] } it { should == 9.32559202767667 } end context "with float values" do let(:values) { [1.0, 2.0, 6.0, 3.0, -4.0, 23.0] } it { should == 9.32559202767667 } end context "with bigdecimal values" do let(:values) { [BigDecimal("1.0"), BigDecimal("2.0"), BigDecimal("6.0"), BigDecimal("3.0"), BigDecimal("-4.0"), BigDecimal("23.0")] } it { should == 9.32559202767667 } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
standard_deviation-0.0.1 | spec/standard_deviation/standard_deviation_spec.rb |