diff options
Diffstat (limited to 'spec/ruby/library/csv')
| -rw-r--r-- | spec/ruby/library/csv/generate_spec.rb | 4 | ||||
| -rw-r--r-- | spec/ruby/library/csv/liberal_parsing_spec.rb | 6 | ||||
| -rw-r--r-- | spec/ruby/library/csv/parse_spec.rb | 4 | ||||
| -rw-r--r-- | spec/ruby/library/csv/readlines_spec.rb | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/library/csv/generate_spec.rb b/spec/ruby/library/csv/generate_spec.rb index 0a1e3d9604..62e19aa6e4 100644 --- a/spec/ruby/library/csv/generate_spec.rb +++ b/spec/ruby/library/csv/generate_spec.rb @@ -21,12 +21,12 @@ describe "CSV.generate" do end it "appends and returns the argument itself" do - str = "" + str = +"" csv_str = CSV.generate(str) do |csv| csv.add_row [1, 2, 3] csv << [4, 5, 6] end - csv_str.should equal str + csv_str.should.equal? str str.should == "1,2,3\n4,5,6\n" end end diff --git a/spec/ruby/library/csv/liberal_parsing_spec.rb b/spec/ruby/library/csv/liberal_parsing_spec.rb index 2929d6e2aa..9878658027 100644 --- a/spec/ruby/library/csv/liberal_parsing_spec.rb +++ b/spec/ruby/library/csv/liberal_parsing_spec.rb @@ -4,16 +4,16 @@ require 'csv' 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 + csv.should.liberal_parsing? end it "returns false if illegal input is not handled" do csv = CSV.new("", liberal_parsing: false) - csv.liberal_parsing?.should == false + csv.should_not.liberal_parsing? end it "returns false by default" do csv = CSV.new("") - csv.liberal_parsing?.should == false + csv.should_not.liberal_parsing? end end diff --git a/spec/ruby/library/csv/parse_spec.rb b/spec/ruby/library/csv/parse_spec.rb index ef5d4ea3ca..7000f03cda 100644 --- a/spec/ruby/library/csv/parse_spec.rb +++ b/spec/ruby/library/csv/parse_spec.rb @@ -5,7 +5,7 @@ describe "CSV.parse" do it "parses '' into []" do result = CSV.parse '' - result.should be_kind_of(Array) + result.should.is_a?(Array) result.should == [] end @@ -82,7 +82,7 @@ describe "CSV.parse" do it "raises CSV::MalformedCSVError exception if input is illegal" do -> { CSV.parse('"quoted" field') - }.should raise_error(CSV::MalformedCSVError) + }.should.raise(CSV::MalformedCSVError) end it "handles illegal input with the liberal_parsing option" do diff --git a/spec/ruby/library/csv/readlines_spec.rb b/spec/ruby/library/csv/readlines_spec.rb index 14dea34381..624f906489 100644 --- a/spec/ruby/library/csv/readlines_spec.rb +++ b/spec/ruby/library/csv/readlines_spec.rb @@ -23,7 +23,7 @@ describe "CSV#readlines" do it "raises CSV::MalformedCSVError exception if input is illegal" do csv = CSV.new('"quoted" field') - -> { csv.readlines }.should raise_error(CSV::MalformedCSVError) + -> { csv.readlines }.should.raise(CSV::MalformedCSVError) end it "handles illegal input with the liberal_parsing option" do |
