Author: kclark
Date: Tue Jun 17 17:51:45 2008
New Revision: 668897
URL: http://svn.apache.org/viewvc?rev=668897&view=rev
Log:
Exercise namespacing in Ruby tests
Modified:
incubator/thrift/trunk/test/SmallTest.thrift
incubator/thrift/trunk/test/rb/generation/test_struct.rb
Modified: incubator/thrift/trunk/test/SmallTest.thrift
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/test/SmallTest.thrift?rev=668897&r1=668896&r2=668897&view=diff
==============================================================================
--- incubator/thrift/trunk/test/SmallTest.thrift (original)
+++ incubator/thrift/trunk/test/SmallTest.thrift Tue Jun 17 17:51:45 2008
@@ -1,4 +1,6 @@
+ruby_namespace TestNamespace
+
struct Goodbyez {
1: i32 val = 325;
}
Modified: incubator/thrift/trunk/test/rb/generation/test_struct.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/test/rb/generation/test_struct.rb?rev=668897&r1=668896&r2=668897&view=diff
==============================================================================
--- incubator/thrift/trunk/test/rb/generation/test_struct.rb (original)
+++ incubator/thrift/trunk/test/rb/generation/test_struct.rb Tue Jun 17
17:51:45 2008
@@ -4,15 +4,15 @@
class TestStructGeneration < Test::Unit::TestCase
def test_default_values
- hello = Hello.new
+ hello = TestNamespace::Hello.new
- assert_kind_of(Hello, hello)
+ assert_kind_of(TestNamespace::Hello, hello)
assert_nil(hello.complexer)
assert_equal(hello.simple, 53)
assert_equal(hello.words, 'words')
- assert_kind_of(Goodbyez, hello.thinz)
+ assert_kind_of(TestNamespace::Goodbyez, hello.thinz)
assert_equal(hello.thinz.val, 36632)
assert_kind_of(Hash, hello.complex)
@@ -20,7 +20,7 @@
end
def test_goodbyez
- assert_equal(Goodbyez.new.val, 325)
+ assert_equal(TestNamespace::Goodbyez.new.val, 325)
end
end