File: spec_helper.rb

package info (click to toggle)
ruby-distribution 0.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 572 kB
  • ctags: 370
  • sloc: ruby: 4,270; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 617 bytes parent folder | download
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