Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tilo committed Jul 10, 2024
1 parent 769d470 commit e8756fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions spec/features/formating/column_separator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
it 'does not detect separators that are between quotes' do
data = SmarterCSV.process("#{fixture_path}/separator_chars_between_quotes.csv", options)


expect(data.first.keys.size).to eq 5
expect(data.first[:"first,_last"]).to eq "John, Doe"
expect(data.size).to eq 3
end

Expand Down Expand Up @@ -159,10 +159,11 @@
it 'does not detect separators that are between quotes' do
data = SmarterCSV.process(
"#{fixture_path}/separator_chars_between_quotes_no_headers.csv",
options.merge(user_provided_headers: %w[Name Age Job Department Project])
options.merge(headers_in_file: false, user_provided_headers: %w[Name Age Job Department Project])
)

expect(data.first.keys.size).to eq 5
expect(data.first["Name"]).to eq "John, Doe"
expect(data.size).to eq 3
end

Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/separator_chars_between_quotes.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"name, info":"age, years":"job, title":"department, info":"project, code"
"first, last":"age, years":"job, title":"department, info":"project, code"
"John, Doe":"35, years":"Senior, Developer":"Engineering, Dept":"Code, 1234"
"Jane, Smith":"29, years":"Project, Manager":"Product, Development":"Code,5678"
"Emily, Jones":"42, years":"CTO,":"Technology,Dept":"Code,9012"

0 comments on commit e8756fa

Please sign in to comment.