summaryrefslogtreecommitdiff
path: root/spec/ruby/core/nil/to_s_spec.rb
blob: fa0b9296779a451a7878a146c037cf897eaed9c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative '../../spec_helper'

describe "NilClass#to_s" do
  it "returns the string ''" do
    nil.to_s.should == ""
  end

  it "returns a frozen string" do
    nil.to_s.should.frozen?
  end

  it "always returns the same string" do
    nil.to_s.should equal(nil.to_s)
  end
end