Sha256: edf346a0707b02d8f7346f5087668fbdf5378ef65b1e0a04e75732ba019d8c03
Contents?: true
Size: 719 Bytes
Versions: 1
Compression:
Stored size: 719 Bytes
Contents
# -*- coding: utf-8 -*- require File.dirname(__FILE__) + '/../../spec_helper' describe Sysadmin, 'Array クラス拡張' do context 'で average メソッドを呼ぶ場合' do it "平均が返却される" do a = [88, 99, 77, 66, 55, 40] a.average.should == 70.83333333333333 end end context 'で variance メソッドを呼ぶ場合' do it "分散が返却される" do a = [88, 99, 77, 66, 55, 40] a.variance.should == 391.8055555555556 end end context 'で standard_devitation メソッドを呼ぶ場合' do it "標準偏差が返却される" do a = [88, 99, 77, 66, 55, 40] a.standard_devitation.should == 19.79407880037754 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sysadmin-0.1.4 | spec/lib/sysadmin/array_ext_spec.rb |