Sha256: 9fc99d974c2c3e474b9976c27f8a8b72973672e3a91faa24b032c0cf751af5d8
Contents?: true
Size: 562 Bytes
Versions: 9
Compression:
Stored size: 562 Bytes
Contents
require_relative '../../helper_no_rails' class RailsDataExplorer module Utils describe DataBinner do describe '#bin' do [ [ '1', { '1 or less' => 1, '2' => 2, '3' => 3 }, [0,1,2,3,4], ['1 or less', '1 or less', '2', '3', '> 3'] ], ].each do |(name, bin_specs, vals, xpect)| it "bins #{ name }" do db = DataBinner.new(bin_specs) vals.map{ |e| db.bin(e) }.must_equal xpect end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems