summaryrefslogtreecommitdiff
path: root/spec/ruby/core/true/to_s_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/true/to_s_spec.rb')
-rw-r--r--spec/ruby/core/true/to_s_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/core/true/to_s_spec.rb b/spec/ruby/core/true/to_s_spec.rb
new file mode 100644
index 0000000000..2c6f3889e9
--- /dev/null
+++ b/spec/ruby/core/true/to_s_spec.rb
@@ -0,0 +1,15 @@
+require_relative '../../spec_helper'
+
+describe "TrueClass#to_s" do
+ it "returns the string 'true'" do
+ true.to_s.should == "true"
+ end
+
+ it "returns a frozen string" do
+ true.to_s.should.frozen?
+ end
+
+ it "always returns the same string" do
+ true.to_s.should.equal?(true.to_s)
+ end
+end