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

Tiny spec fix for Ruby 1.8.x

This commit is contained in:
Mike Dvorkin 2012-09-03 11:57:16 -07:00
parent 246f5f93ab
commit fcdc3b6320

View file

@ -597,7 +597,7 @@ EOS
# 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" }
grepped = hash.keys.grep(/^(\d+)\//) { $1 }
grepped = hash.keys.sort.grep(/^(\d+)\//) { $1 }
grepped.ai(:plain => true, :multiline => false).should == '[ "1", "2" ]'
end