Sha256: 970899e9b99b4d1b30447e898e3309bb49fc600b02bc86ecf6c86d108b7fb67b
Contents?: true
Size: 630 Bytes
Versions: 19
Compression:
Stored size: 630 Bytes
Contents
# spec for picking most-recent or highest-scoring rows # # something like: # select * from rows group by col_a having col_b = max(col_b) # # usage: masticate maxrows --by col_a --max col_b require "spec_helper" require "tempfile" describe "maxrows" do it "should find " do filename = File.dirname(__FILE__) + "/../data/events.csv" tmp = Tempfile.new('maxrows') results = Masticate.maxrows(filename, :output => tmp, :by => 'uid', :max => 'timestamp') output = File.read(tmp) correct_output = File.read(File.dirname(__FILE__) + "/../data/events_reduced.csv") output.should == correct_output end end
Version data entries
19 entries across 19 versions & 1 rubygems