From 090b69ee631918ab3bc75632c93e461ba6913b46 Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Wed, 18 Jun 2008 01:12:58 +0000 Subject: [PATCH] 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 --- lib/rb/spec/struct_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.17.1