blob: 41ca65f5d8876b10cb8a707fa5ab6d44acc59e65 [file] [log] [blame]
Kevin Clark5a7103a2008-06-18 00:55:11 +00001require 'rubygems'
2require 'rake'
3require 'spec/rake/spectask'
4
Kevin Clarkc2a07b12008-06-18 00:57:06 +00005task :default => [:spec, :test]
Kevin Clark5a7103a2008-06-18 00:55:11 +00006
7Spec::Rake::SpecTask.new("spec") do |t|
8 t.spec_files = FileList['spec/**/*_spec.rb']
9 t.spec_opts = ['--color']
10end
Kevin Clarkc2a07b12008-06-18 00:57:06 +000011
Kevin Clarkeb0dd7f2008-06-18 01:12:15 +000012Spec::Rake::SpecTask.new("rcov_spec") do |t|
13 t.spec_files = FileList['spec/**/*_spec.rb']
14 t.spec_opts = ['--color']
15 t.rcov = true
16 t.rcov_opts = ['--exclude', '^spec,/gems/']
17end
18
Kevin Clarkc2a07b12008-06-18 00:57:06 +000019task :test do
Kevin Clarka7613dd2008-06-18 01:13:48 +000020 sh 'make', '-C', File.dirname(__FILE__) + "/../../test/rb"
21end
22
23task :'gen-rb' do
24 thrift = '../../compiler/cpp/thrift'
25 dir = File.dirname(__FILE__) + '/spec'
26 sh thrift, '--gen', 'rb', '-o', dir, "#{dir}/ThriftSpec.thrift"
Kevin Clarkc2a07b12008-06-18 00:57:06 +000027end