Sha256: ceb86350b24b316bc85dbab2681cfdd67258e5b1de41d89e4f229220b124916b

Contents?: true

Size: 492 Bytes

Versions: 6

Compression:

Stored size: 492 Bytes

Contents

# spec for file-sniffing functions

require "spec_helper"
require "tempfile"

describe "csvification" do
  it "should convert pipes to standard commas" do
    filename = File.dirname(__FILE__) + "/../data/pipe_data.txt"
    tmp = Tempfile.new('csvify')
    results = Masticate.csvify(filename, :output => tmp, :col_sep => '|')
    output = File.read(tmp)
    tmp.unlink
    output.lines.count.should == 5
    results[:input_count].should == 6
    results[:output_count].should == 5
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
masticate-0.2 spec/lib/csvify_spec.rb
masticate-0.1.5 spec/lib/csvify_spec.rb
masticate-0.1.4 spec/lib/csvify_spec.rb
masticate-0.1.3 spec/lib/csvify_spec.rb
masticate-0.1.1 spec/lib/csvify_spec.rb
masticate-0.1.0 spec/lib/csvify_spec.rb