2018-03-04 10:09:32 -05:00
|
|
|
require_relative '../../spec_helper'
|
2017-10-28 11:15:48 -04:00
|
|
|
require 'csv'
|
|
|
|
|
2019-04-27 12:53:23 -04:00
|
|
|
describe "CSV#liberal_parsing?" do
|
|
|
|
it "returns true if illegal input is handled" do
|
|
|
|
csv = CSV.new("", liberal_parsing: true)
|
|
|
|
csv.liberal_parsing?.should == true
|
|
|
|
end
|
2017-10-28 11:15:48 -04:00
|
|
|
|
2019-04-27 12:53:23 -04:00
|
|
|
it "returns false if illegal input is not handled" do
|
|
|
|
csv = CSV.new("", liberal_parsing: false)
|
|
|
|
csv.liberal_parsing?.should == false
|
|
|
|
end
|
2017-10-28 11:15:48 -04:00
|
|
|
|
2019-04-27 12:53:23 -04:00
|
|
|
it "returns false by default" do
|
|
|
|
csv = CSV.new("")
|
|
|
|
csv.liberal_parsing?.should == false
|
2017-10-28 11:15:48 -04:00
|
|
|
end
|
|
|
|
end
|