Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Commit

Permalink
Failing test for returning nil if all values to be weighted are nil
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Hough committed Oct 10, 2011
1 parent 578e1d0 commit 78499a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_weighted_average.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
)
end

# nothing but nils

it "returns nil if the values to be weighted are all nil" do
must_be_nil(Segment.weighted_average(:mail, :weighted_by => :passengers))
end

# multiple columns

it "adds multiple columns before averaging" do
Expand Down

0 comments on commit 78499a0

Please sign in to comment.