Permalink
Browse files

Add spec examples for encoding of nil values

References #23
  • Loading branch information...
1 parent 9dac53a commit 39401eeab8e31b6e7940590e7c07a5da18c4834a @michaelklishin michaelklishin committed Jun 27, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/amq/protocol/table_spec.rb
@@ -94,6 +94,15 @@ module Protocol
end
+ it "is capable of decoding nil table values" do
+ input = { "nilval" => nil }
+ Table.decode(Table.encode(input)).should == input
+ end
+
+ it "is capable of decoding nil table in nested hash/map values" do
+ input = { "hash" => {"nil" => nil} }
+ Table.decode(Table.encode(input)).should == input
+ end
it "is capable of decoding string table values" do
input = { "stringvalue" => "string" }

0 comments on commit 39401ee

Please sign in to comment.