From d5c98eedc83aca595a8feea60a331c291fd7eeba Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Wed, 18 Jun 2008 00:51:45 +0000 Subject: [PATCH] Exercise namespacing in Ruby tests git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668897 13f79535-47bb-0310-9956-ffa450edef68 --- test/SmallTest.thrift | 2 ++ test/rb/generation/test_struct.rb | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/SmallTest.thrift b/test/SmallTest.thrift index bded87ab..531bf17b 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 b6c60bad..3af0df84 100644 --- a/test/rb/generation/test_struct.rb +++ b/test/rb/generation/test_struct.rb @@ -4,15 +4,15 @@ require 'SmallService' 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 @@ class TestStructGeneration < Test::Unit::TestCase end def test_goodbyez - assert_equal(Goodbyez.new.val, 325) + assert_equal(TestNamespace::Goodbyez.new.val, 325) end end -- 2.17.1