Sha256: 79a65f6a4f29457300099f88a9450859eb2dfce2ba0ff4026c28bec3e9b48ce8
Contents?: true
Size: 972 Bytes
Versions: 2
Compression:
Stored size: 972 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "MutuallyExclusiveCollection" do before(:each) do @good_team = FixedOdds.from_s '-275' @draw = FixedOdds.from_s '+429' @bad_team = FixedOdds.from_s '+915' @events = MutuallyExclusiveCollection.new [@draw, @bad_team, @good_team] end describe "#least_likely" do it "is the least likely event" do @events.least_likely.should == @bad_team end end describe "#most_likely" do it "is the most likely event" do @events.most_likely.should == @good_team end end describe "#in_descending_probability" do it "is in descending order of probability" do @events.in_descending_probability.should == [@good_team, @draw, @bad_team] end end describe "#in_ascending_probability" do it "is in ascending order of probability" do @events.in_ascending_probability.should == [@bad_team, @draw, @good_team] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rodders-2.1.0 | spec/mutually_exclusive_collection_spec.rb |
rodders-1.0.0 | spec/MutuallyExclusiveCollection_spec.rb |