THRIFT-709. Print enum value names in Ruby

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@911500 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/struct_spec.rb b/lib/rb/spec/struct_spec.rb
index 237f982..045b963 100644
--- a/lib/rb/spec/struct_spec.rb
+++ b/lib/rb/spec/struct_spec.rb
@@ -62,6 +62,12 @@
       Foo.new(:simple => 52).should_not == Foo.new
     end
 
+    it "should print enum value names in inspect" do
+      StructWithSomeEnum.new(:some_enum => SomeEnum::ONE).inspect.should == "<SpecNamespace::StructWithSomeEnum some_enum:ONE (0)>"
+
+      StructWithEnumMap.new(:my_map => {SomeEnum::ONE => [SomeEnum::TWO]}).inspect.should == "<SpecNamespace::StructWithEnumMap my_map:{ONE (0): [TWO (1)]}>"
+    end
+
     it "should read itself off the wire" do
       struct = Foo.new
       prot = BaseProtocol.new(mock("transport"))