Sha256: 2eca280dcb5ece9e03e31b0ebf40e2e21c637cc5d7604d0c76d019f6ac0e8d66
Contents?: true
Size: 471 Bytes
Versions: 3
Compression:
Stored size: 471 Bytes
Contents
Given /^a "([^"]*)" file with the following rows:$/ do |filename, table| CSV.open File.join('tmp', filename), "wb" do |csv| table.raw.each { |row| csv << row } end end Then /^the "([^"]*)" file should exist with the following content:$/ do |filename, table| expected_file = CSV.generate do |csv| table.raw.each { |row| csv << row } end resulting_file = File.new(File.join('tmp', filename), "rb").read expect(resulting_file).to eq expected_file end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
itiel-0.1.2 | features/step_definitions/csv_steps.rb |
itiel-0.1.1 | features/step_definitions/csv_steps.rb |
itiel-0.1.0 | features/step_definitions/csv_steps.rb |