summaryrefslogtreecommitdiff
path: root/spec/ruby/library/csv
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/csv')
-rw-r--r--spec/ruby/library/csv/generate_spec.rb4
-rw-r--r--spec/ruby/library/csv/parse_spec.rb4
-rw-r--r--spec/ruby/library/csv/readlines_spec.rb2
3 files changed, 5 insertions, 5 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/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