Sha256: 82b48bf2ecc13338e72e0c122e7bb57481208e7d6f7e6d88c020d9c71e09b459

Contents?: true

Size: 540 Bytes

Versions: 3

Compression:

Stored size: 540 Bytes

Contents

# spec for column-plucking functions

require "spec_helper"
require "tempfile"

describe "plucker" do
  it "should pull named columns" do
    filename = File.dirname(__FILE__) + "/../data/namedcols.csv"
    tmp = Tempfile.new('plucker')
    results = Masticate.pluck(filename, :output => tmp, :fields => ['three', 'five'])
    output = File.read(tmp)
    correct_output = File.read(File.dirname(__FILE__) + "/../data/namedcols.csv.output")
    tmp.unlink

    results[:input_count].should == 5
    output.should == correct_output
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
masticate-0.1.3 spec/lib/plucker_spec.rb
masticate-0.1.1 spec/lib/plucker_spec.rb
masticate-0.1.0 spec/lib/plucker_spec.rb