1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
$:.unshift(File.dirname(__FILE__)+"/../lib")
begin
require 'simplecov'
SimpleCov.start do
add_filter "/spec/"
add_group "Libraries", "lib"
end
rescue LoadError
end
require 'rspec'
require 'distribution'
module ExampleWithGSL
def it_only_with_gsl(name,&block)
it(name) do
if Distribution.has_gsl?
instance_eval(&block)
else
pending("Requires GSL")
end
end
end
def it_only_with_java(name,&block)
it(name) do
if Distribution.has_java?
instance_eval(&block)
else
pending("Requires Java")
end
end
end
end
|