Sha256: bf880d18827e9c9b4c230deca23403350ac603d810b5ba910a79f4db0607362e
Contents?: true
Size: 577 Bytes
Versions: 52
Compression:
Stored size: 577 Bytes
Contents
describe :array_pack_hex, :shared => true do it "encodes no bytes when passed zero as the count modifier" do ["abc"].pack(pack_format(0)).should == "" end it "raises a TypeError if the object does not respond to #to_str" do obj = mock("pack hex non-string") lambda { [obj].pack(pack_format) }.should raise_error(TypeError) end it "raises a TypeError if #to_str does not return a String" do obj = mock("pack hex non-string") obj.should_receive(:to_str).and_return(1) lambda { [obj].pack(pack_format) }.should raise_error(TypeError) end end
Version data entries
52 entries across 52 versions & 2 rubygems