Sha256: 999d1561f815c21bbff2c0db8cd9413246bf487e22b2d40b8f1f5f11c972e796

Contents?: true

Size: 473 Bytes

Versions: 10

Compression:

Stored size: 473 Bytes

Contents

# spec for file-sniffing functions

require "spec_helper"

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 == 5
    results[:output_count].should == 5
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
masticate-0.6.2 spec/lib/csvify_spec.rb
masticate-0.6.1 spec/lib/csvify_spec.rb
masticate-0.6.0 spec/lib/csvify_spec.rb
masticate-0.5.1 spec/lib/csvify_spec.rb
masticate-0.5.0 spec/lib/csvify_spec.rb
masticate-0.4.2 spec/lib/csvify_spec.rb
masticate-0.4.1 spec/lib/csvify_spec.rb
masticate-0.4.0 spec/lib/csvify_spec.rb
masticate-0.3.2 spec/lib/csvify_spec.rb
masticate-0.3.1 spec/lib/csvify_spec.rb