aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/compatibility_tests/v3.0.0/Rakefile
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-02-23 17:53:06 -0800
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2017-02-27 17:38:54 -0800
commit9118ad659b21e98c5f44fe1b13f89ec1d23756b1 (patch)
treed13d83d3e2532aa6a7695c097de43a046e046b1f /ruby/compatibility_tests/v3.0.0/Rakefile
parent963473b1dd4f37c5c0b8ca72f1c4a05225b927b7 (diff)
Add Ruby compatibilty test against 3.0.0.
Diffstat (limited to 'ruby/compatibility_tests/v3.0.0/Rakefile')
-rw-r--r--ruby/compatibility_tests/v3.0.0/Rakefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/ruby/compatibility_tests/v3.0.0/Rakefile b/ruby/compatibility_tests/v3.0.0/Rakefile
new file mode 100644
index 00000000..19a4ba12
--- /dev/null
+++ b/ruby/compatibility_tests/v3.0.0/Rakefile
@@ -0,0 +1,25 @@
+require "rake/testtask"
+
+# Proto for tests.
+genproto_output = []
+genproto_output << "tests/generated_code.rb"
+genproto_output << "tests/test_import.rb"
+file "tests/generated_code.rb" => "tests/generated_code.proto" do |file_task|
+ sh "./protoc --ruby_out=. tests/generated_code.proto"
+end
+
+file "tests/test_import.rb" => "tests/test_import.proto" do |file_task|
+ sh "./protoc --ruby_out=. tests/test_import.proto"
+end
+
+task :genproto => genproto_output
+
+task :clean do
+ sh "rm -f #{genproto_output.join(' ')}"
+end
+
+Rake::TestTask.new(:test => :genproto) do |t|
+ t.test_files = FileList["tests/*.rb"]
+end
+
+task :default => [:test]