Sha256: 4c3e08b4fbc5f8a64925c9ae684d933fc482777e33e3c72fbf2c1f8ff78b90bf
Contents?: true
Size: 862 Bytes
Versions: 5
Compression:
Stored size: 862 Bytes
Contents
require_relative '../../../helper_no_rails' class RailsDataExplorer class DataType class Quantitative describe Temporal do let(:dt) { Temporal.new } let(:values) { [DateTime.new(2015, 02, 06), DateTime.new(2015, 02, 07)] } describe "#descriptive_statistics" do let(:desc_stats) { dt.descriptive_statistics(values) } it "computes 'Min'" do desc_stats.detect { |e| 'Min' == e[:label] }[:value].must_equal DateTime.new(2015, 02, 06) end it "computes 'Max'" do desc_stats.detect { |e| 'Max' == e[:label] }[:value].must_equal DateTime.new(2015, 02, 07) end it "computes 'Count'" do desc_stats.detect { |e| 'Count' == e[:label] }[:value].must_equal 2 end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems