aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/tests
diff options
context:
space:
mode:
authorGravatar Joshua Haberman <jhaberman@gmail.com>2016-07-25 16:48:32 -0700
committerGravatar GitHub <noreply@github.com>2016-07-25 16:48:32 -0700
commitba52f2b6780fa5e6bee86cf7e8ee6f6ba617862c (patch)
tree15648c4129bc70f58698a7c96fdfb08288f3a8a0 /ruby/tests
parentc43f71886d6447248806ff61b865517f9f1a9e9d (diff)
parent97e20261ac8a04577b2d588fed6be327000e4295 (diff)
Merge pull request #1788 from google/rubypackagecap
Ruby: translate package names from snake_case -> PascalCase.
Diffstat (limited to 'ruby/tests')
-rw-r--r--ruby/tests/generated_code.proto2
-rw-r--r--ruby/tests/generated_code_test.rb2
-rw-r--r--ruby/tests/test_import.proto5
3 files changed, 8 insertions, 1 deletions
diff --git a/ruby/tests/generated_code.proto b/ruby/tests/generated_code.proto
index 42d82a6b..62fd83ed 100644
--- a/ruby/tests/generated_code.proto
+++ b/ruby/tests/generated_code.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-package A.B.C;
+package a.b.c;
message TestMessage {
int32 optional_int32 = 1;
diff --git a/ruby/tests/generated_code_test.rb b/ruby/tests/generated_code_test.rb
index 26bafdd6..b92b0462 100644
--- a/ruby/tests/generated_code_test.rb
+++ b/ruby/tests/generated_code_test.rb
@@ -4,6 +4,7 @@
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
require 'generated_code_pb'
+require 'test_import_pb'
require 'test/unit'
class GeneratedCodeTest < Test::Unit::TestCase
@@ -13,5 +14,6 @@ class GeneratedCodeTest < Test::Unit::TestCase
# successfully creates message definitions and classes, not to test every
# aspect of the extension (basic.rb is for that).
m = A::B::C::TestMessage.new()
+ m2 = FooBar::TestImportedMessage.new()
end
end
diff --git a/ruby/tests/test_import.proto b/ruby/tests/test_import.proto
new file mode 100644
index 00000000..230484ee
--- /dev/null
+++ b/ruby/tests/test_import.proto
@@ -0,0 +1,5 @@
+syntax = "proto3";
+
+package foo_bar;
+
+message TestImportedMessage {}