Merge branch 'fastbinary'
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@674688 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/rb/test_helper.rb b/test/rb/test_helper.rb
index 125f52f..51f72b1 100644
--- a/test/rb/test_helper.rb
+++ b/test/rb/test_helper.rb
@@ -1,4 +1,16 @@
$:.unshift File.dirname(__FILE__) + '/gen-rb'
$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/lib')
+$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/ext')
require 'test/unit'
+
+module Thrift
+ module Struct
+ def ==(other)
+ return false unless other.is_a? self.class
+ self.class.const_get(:FIELDS).collect {|fid, data| data[:name] }.all? do |field|
+ send(field) == other.send(field)
+ end
+ end
+ end
+end