1#!/usr/bin/ruby 2 3# generated_code.rb is in the same directory as this test. 4$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) 5 6require 'generated_code_proto2_pb' 7require 'test_import_proto2_pb' 8require 'test_ruby_package_proto2_pb' 9require 'test/unit' 10 11class GeneratedCodeProto2Test < Test::Unit::TestCase 12 def test_generated_msg 13 # just test that we can instantiate the message. The purpose of this test 14 # is to ensure that the output of the code generator is valid Ruby and 15 # successfully creates message definitions and classes, not to test every 16 # aspect of the extension (basic.rb is for that). 17 A::B::Proto2::TestMessage.new 18 FooBar::Proto2::TestImportedMessage.new 19 A::B::Proto2::TestRubyPackageMessage.new 20 end 21end 22