Sha256: 9cf5e9f546884a98922eab6f8c827622ec035ef95de703a0a08bfe3762105101
Contents?: true
Size: 735 Bytes
Versions: 17
Compression:
Stored size: 735 Bytes
Contents
require 'spec_helper' fixture_path = 'spec/fixtures' describe 'malformed_csv' do subject { lambda { SmarterCSV.process(csv_path) } } context "malformed header" do let(:csv_path) { "#{fixture_path}/malformed_header.csv" } it { should raise_error(CSV::MalformedCSVError) } it { should raise_error(/(Missing or stray quote in line 1|CSV::MalformedCSVError)/) } it { should raise_error(CSV::MalformedCSVError) } end context "malformed content" do let(:csv_path) { "#{fixture_path}/malformed.csv" } it { should raise_error(CSV::MalformedCSVError) } it { should raise_error(/(Missing or stray quote in line 1|CSV::MalformedCSVError)/) } it { should raise_error(CSV::MalformedCSVError) } end end
Version data entries
17 entries across 17 versions & 2 rubygems