1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Added spec for frozen object.inspect

This commit is contained in:
Mike Dvorkin 2011-11-08 13:19:47 -08:00
parent 3d9bdc4e9b
commit 3ee9e2d700

View file

@ -544,6 +544,15 @@ EOS
weird.new.ai(:plain => true).should == ''
end
it "handle frozen object.inspect" do
weird = Class.new do
def inspect
"ice".freeze
end
end
weird.new.ai(:plain => false).should == "ice"
end
# See https://github.com/michaeldv/awesome_print/issues/35
it "handle array grep when pattern contains / chapacter" do
hash = { "1/x" => 1, "2//x" => :"2" }