spec/enumerable/median_spec.rb in simple_stats-1.0.0 vs spec/enumerable/median_spec.rb in simple_stats-1.1.0

- old
+ new

@@ -22,7 +22,13 @@ median = data.median median.should == expected median.class.should == expected.class end end + + it "calls map first if a block is given" do + f = Struct.new(:x) + data = [f.new(4), f.new(1), f.new(6)] + data.median(&:x).should == 4.0 + end end end \ No newline at end of file