Sha256: a865b41172bf4b2d7d167a42d99e3b4857930ed91290f0c368192c2b47bf3b63
Contents?: true
Size: 505 Bytes
Versions: 15
Compression:
Stored size: 505 Bytes
Contents
# spec for field regexp conversion require "spec_helper" describe "gsubbing" do it "should apply conversion to a single column" do filename = File.dirname(__FILE__) + "/../data/badnums.csv" tmp = Tempfile.new('gsubber') results = Masticate.gsub(filename, :output => tmp, :field => 'AuditByID', :from => '/,|(.00$)/', :to => '') output = File.read(tmp) correct_output = File.read(File.dirname(__FILE__) + "/../data/badnums_fixed.csv") output.should == correct_output end end
Version data entries
15 entries across 15 versions & 1 rubygems