Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.53 kb
require File.dirname(__FILE__) + '/../../spec_helper'
require File.dirname(__FILE__) + '/fixtures/classes'
describe "Array#to_s" do
it "is equivalent to #join without a separator string" do
old = $,
begin
a = [1, 2, 3, 4]
a.to_s.should == a.join
$, = '-'
a.to_s.should == a.join
ensure
$, = old
end
end
it "properly handles recursive arrays" do
ArraySpecs.empty_recursive_array.to_s.should == "[...]"
a = [1, 2, 3]; a << a
a.to_s.should == "123123[...]"
end
end
Jump to Line
Something went wrong with that request. Please try again.