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:
parent
71044fdd20
commit
a48e74cb2f
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue