From: Kevin Clark Date: Wed, 18 Jun 2008 01:12:58 +0000 (+0000) Subject: Add useless struct test for code coverage X-Git-Tag: 0.2.0~571 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=090b69ee631918ab3bc75632c93e461ba6913b46;p=common%2Fthrift.git Add useless struct test for code coverage git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668979 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/spec/struct_spec.rb b/lib/rb/spec/struct_spec.rb index 5a4dc6a7..8e106fa9 100644 --- a/lib/rb/spec/struct_spec.rb +++ b/lib/rb/spec/struct_spec.rb @@ -150,4 +150,10 @@ class ThriftStructSpec < Spec::ExampleGroup struct.complex = {5 => {"foo" => 1.23}} struct.write(prot) end + + it "should raise an exception if presented with an unknown container" do + # yeah this is silly, but I'm going for code coverage here + struct = Foo.new + lambda { struct.send :write_container, nil, nil, {:type => "foo"} }.should raise_error(StandardError, "Not a container type: foo") + end end