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

- old
+ new

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