spec/jruby_memcache_spec.rb in jruby-memcache-client-1.6.0 vs spec/jruby_memcache_spec.rb in jruby-memcache-client-1.6.1

- old
+ new

@@ -180,9 +180,23 @@ it "should be able to transparently set and get equivalent Ruby objects" do obj = { :test => :hi } @client.set('obj', obj) @client.get('obj').should == obj end + + it %[should work with those whose marshalled stream contains invalid UTF8 byte sequences] do + # this test fails w/o the Base64 encoding step + obj = { :foo => 900 } + @client.set('obj', obj) + @client.get('obj').should == obj + end + + it %[should work with binary blobs] do + # this test fails w/o the Base64 encoding step + blob = "\377\330\377\340\000\020JFIF\000\001\001\000\000\001\000\001\000\000\377" + @client.set('blob', blob) + @client.get('blob').should == blob + end end describe "using set with an expiration" do it "should make a value unretrievable if the expiry is set to a negative value" do @client.set('key', 'val', -1)