Exercise namespacing in Ruby tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668897 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/SmallTest.thrift b/test/SmallTest.thrift
index bded87a..531bf17 100644
--- a/test/SmallTest.thrift
+++ b/test/SmallTest.thrift
@@ -1,4 +1,6 @@
+ruby_namespace TestNamespace
+
struct Goodbyez {
1: i32 val = 325;
}
diff --git a/test/rb/generation/test_struct.rb b/test/rb/generation/test_struct.rb
index b6c60ba..3af0df8 100644
--- a/test/rb/generation/test_struct.rb
+++ b/test/rb/generation/test_struct.rb
@@ -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