Adjust test inclusion based on FFI platform to only run mach tests on mac.

This commit is contained in:
Patrick Mahoney 2012-02-07 20:44:53 -06:00
parent c2c19e0268
commit 890d7e4e8b
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
require 'rake/extensiontask' require 'rake/extensiontask'
require 'rake/testtask' require 'rake/testtask'
require 'rubygems/package_task' require 'rubygems/package_task'
require 'ffi'
def gemspec def gemspec
@gemspec ||= eval(File.read('process_shared.gemspec'), binding, 'process_shared.gemspec') @gemspec ||= eval(File.read('process_shared.gemspec'), binding, 'process_shared.gemspec')
@ -14,7 +15,11 @@ desc 'Run the tests'
task :default => [:test] task :default => [:test]
Rake::TestTask.new(:test => [:compile]) do |t| Rake::TestTask.new(:test => [:compile]) do |t|
t.pattern = 'spec/process_shared/**/*_spec.rb' if FFI::Platform.mac?
t.pattern = 'spec/**/*_spec.rb' # only include mach tests on mac
else
t.pattern = 'spec/process_shared/**/*_spec.rb'
end
t.libs.push 'spec' t.libs.push 'spec'
end end