test/decode_spec.rb in mojombo-erlectricity-1.0.1 vs test/decode_spec.rb in mojombo-erlectricity-1.0.2

- old
+ new

@@ -108,13 +108,21 @@ get("<< 3,4,255 >>").should == "\003\004\377" get("<< \"whatup\" >>").should == "whatup" get("<< 99,0,99 >>").should == "c\000c" end + specify "the empty atom should decode to the empty symbol" do + empty_symbol = get("''") + empty_symbol.should.be.instance_of Symbol + empty_symbol.to_s.should == "" + end + specify "erlang atomic booleans should decode to ruby booleans" do get("true").should == true get("false").should == false get("falsereio").should == :falsereio + get("t").should == :t + get("f").should == :f end specify "a good thing should be awesome" do get(%Q-[{options,{struct,[{test,<<"I'm chargin' mah lazer">>}]}},{passage,<<"Why doesn't this work?">>}]-).should == [[:options, [:struct, [[:test, "I'm chargin' mah lazer"]]]], [:passage, "Why doesn't this work?"]] \ No newline at end of file