diff options
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/Rakefile | 5 | ||||
-rw-r--r-- | ruby/tests/generated_code_test.rb | 2 | ||||
-rw-r--r-- | ruby/tests/test_ruby_package.proto | 7 |
3 files changed, 14 insertions, 0 deletions
diff --git a/ruby/Rakefile b/ruby/Rakefile index ff09cebb..013bc99a 100644 --- a/ruby/Rakefile +++ b/ruby/Rakefile @@ -87,6 +87,7 @@ end # Proto for tests. genproto_output << "tests/generated_code.rb" genproto_output << "tests/test_import.rb" +genproto_output << "tests/test_ruby_package.rb" file "tests/generated_code.rb" => "tests/generated_code.proto" do |file_task| sh "../src/protoc --ruby_out=. tests/generated_code.proto" end @@ -95,6 +96,10 @@ file "tests/test_import.rb" => "tests/test_import.proto" do |file_task| sh "../src/protoc --ruby_out=. tests/test_import.proto" end +file "tests/test_ruby_package.rb" => "tests/test_ruby_package.proto" do |file_task| + sh "../src/protoc --ruby_out=. tests/test_ruby_package.proto" +end + task :genproto => genproto_output task :clean do diff --git a/ruby/tests/generated_code_test.rb b/ruby/tests/generated_code_test.rb index b92b0462..431d681b 100644 --- a/ruby/tests/generated_code_test.rb +++ b/ruby/tests/generated_code_test.rb @@ -5,6 +5,7 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) require 'generated_code_pb' require 'test_import_pb' +require 'test_ruby_package_pb' require 'test/unit' class GeneratedCodeTest < Test::Unit::TestCase @@ -15,5 +16,6 @@ class GeneratedCodeTest < Test::Unit::TestCase # aspect of the extension (basic.rb is for that). m = A::B::C::TestMessage.new() m2 = FooBar::TestImportedMessage.new() + m3 = A::B::TestRubyPackageMessage.new() end end diff --git a/ruby/tests/test_ruby_package.proto b/ruby/tests/test_ruby_package.proto new file mode 100644 index 00000000..b8725620 --- /dev/null +++ b/ruby/tests/test_ruby_package.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package foo_bar; + +option ruby_package = "A.B"; + +message TestRubyPackageMessage {} |