Fix rails cache test for ruby 2.1

Now it behaves like in test/test_format.rb

Change-Id: Ic9511bb33cbb2e95030c244bb60cef2298c35b5c
Reviewed-on: http://review.couchbase.org/35387
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>