Add useless struct test for code coverage
authorKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 01:12:58 +0000 (01:12 +0000)
committerKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 01:12:58 +0000 (01:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668979 13f79535-47bb-0310-9956-ffa450edef68

lib/rb/spec/struct_spec.rb

index 5a4dc6a..8e106fa 100644 (file)
@@ -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