Sha256: b876993a84a2db122de1c69e272ed17ce4df7980c3499debc20779ea763a2a17
Contents?: true
Size: 730 Bytes
Versions: 13
Compression:
Stored size: 730 Bytes
Contents
# encoding: utf-8 require File.expand_path('spec_helper.rb', File.dirname(__FILE__)) include CassandraCQL describe "compress" do it "should return some valid gzipped stuff" do stuff = "This is some stuff" bytes = Utility.compress(stuff) Utility.binary_data?(bytes).should be_true Utility.decompress(bytes).should eq(stuff) end it "should be binary data" do if RUBY_VERSION >= "1.9" Utility.binary_data?("binary\x00".force_encoding('ASCII-8BIT')).should be_true else Utility.binary_data?("binary\x00").should be_true end end it "should not be binary data" do Utility.binary_data?("test").should_not be_true Utility.binary_data?("snårk").should_not be_true end end
Version data entries
13 entries across 13 versions & 2 rubygems