Half-finished csv command
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Squib::Deck do
|
||||
context '#csv' do
|
||||
# it 'loads basic csv data' do
|
||||
# expect(Squib.csv(file: csv_file('basic.csv'))).to eq({
|
||||
# 'h1' => [1, 3],
|
||||
# 'h2' => [2, 4]
|
||||
# })
|
||||
# end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
h1,h2
|
||||
1,2
|
||||
3,4
|
||||
|
@@ -27,6 +27,10 @@ def sample_regression_file(file)
|
||||
"#{File.expand_path(File.dirname(__FILE__))}/data/samples/#{file}.txt"
|
||||
end
|
||||
|
||||
def csv_file(file)
|
||||
"#{File.expand_path(File.dirname(__FILE__))}/data/csv/#{file}"
|
||||
end
|
||||
|
||||
def overwrite_sample(sample_name, log)
|
||||
# Use this to overwrite the regression with current state
|
||||
File.open(sample_regression_file(sample_name), 'w+:UTF-8') do |f|
|
||||
|
||||
Reference in New Issue
Block a user