Sha256: 22f3b00809cc8616a1d5056543d07a8b039ae7d09b6eb6c9db13e79e578898ec

Contents?: true

Size: 388 Bytes

Versions: 1

Compression:

Stored size: 388 Bytes

Contents

require 'smart_csv'

describe CSV::Row do

  before(:each) do
    data = "id,firstname,lastname\n1,One,One\n2,Two,Two\n4,Four,Four\n5,Five,Five\n6,One,One"
    @data = CSV.parse(data, {:col_sep => ',', :headers => true})
  end

  it "should correct updete record" do
    @data[2].update("lastname" => "Seven", "id" => "2012")
    @data.where("id" => "2012").size.should eql(1)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smart_csv-0.0.7 spec/csv/row/row_spec.rb