Hello friends I am new to Ruby Rspec
I am testing a Ruby Rspec csv parser for csv manipulation with
describe "bashing outing the strings" do
it " inputs" do
expect(guess_csv("100,24,32\n42,52,62", ",", "\"")).to eq([["100", "24", "32"], ["42", "52", "62"]])
end
and ruby.rb
def parse_csv(csv, separator, quote)
final_array = []
lines = ("100,24,32\n42,52,62", ",", "\"", quote: "'", separator: ",").split(/\,\n/).map(&:parse_csv) do |line|
line.split(',')
final_array << line.scan(/\,\n/)
end
final_array
end```
An error occurred while loading spec_helper.
Failure/Error: require 'solution'
An error occurred while loading spec_helper. Failure/Error: require βservertimeβ
SyntaxError: /chicago/default/lib/servertime.rb:3: syntax error, unexpected β,β, expecting β)β β¦lines = (β100,24,32\n42,52,62β, β,β, βββ, quote: β'β, sepaβ¦ β¦ ^ /chicago/default/lib/servertime.rb:3: syntax error, unexpected β,β, expecting β)β β¦ = (β100,24,32\n42,52,62β, β,β, βββ, quote: β'β, separatorβ¦ β¦ ^ /chicago/default/lib/servertime.rb:3: syntax error, unexpected β,β, expecting β)β β¦00,24,32\n42,52,62", β,β, βββ, quote: β'β, separator: β,β)β¦ β¦ ^ /chicago/default/lib/servertime.rb:3: syntax error, unexpected β,β, expecting β)β β¦52,62β, β,β, ββ", quote: β'β, separator: β,β).split(/,\n/β¦ β¦ ^ /chicago/default/lib/servertime.rb:6: both block arg and actual block given
./spec/spec_helper.rb:1:in `requireβ
./spec/spec_helper.rb:1:in `<top (required)>β
No examples found. No examples found.
Just wondering how to fix it