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

Fixed methods array spec when running with Ruby 1.9.2+

This commit is contained in:
Michael Dvorkin 2011-12-13 16:01:14 -08:00
parent 71044fdd20
commit a48e74cb2f

View file

@ -449,6 +449,10 @@ describe "Methods arrays" do
it "appending garbage to methods array should not raise error" do
arr = 42.methods << [ :wtf ]
arr.ai(:plain => true).should_not raise_error(TypeError)
arr.ai(:plain => true).should =~ /\s+wtf\(\?\)\s+\?/
if RUBY_VERSION < '1.9.2'
arr.ai(:plain => true).should =~ /\s+wtf\(\?\)\s+\?/ # [ :wtf ].to_s => "wtf"
else
arr.ai(:plain => true).should =~ /\s+\[:wtf\]\(\?\)\s+\?/ # [ :wtf ].to_s => [:wtf]
end
end
end