Author: kclark
Date: Tue Jun 17 18:12:58 2008
New Revision: 668979
URL: http://svn.apache.org/viewvc?rev=668979&view=rev
Log:
Add useless struct test for code coverage
Modified:
incubator/thrift/trunk/lib/rb/spec/struct_spec.rb
Modified: incubator/thrift/trunk/lib/rb/spec/struct_spec.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/struct_spec.rb?rev=668979&r1=668978&r2=668979&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/struct_spec.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/struct_spec.rb Tue Jun 17 18:12:58 2008
@@ -150,4 +150,10 @@
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