Sha256: f1e63f4b77d2a8168f6b8d1ea72c4695036f69a8ebf9c19babfec8b56b8b55bc

Contents?: true

Size: 948 Bytes

Versions: 1

Compression:

Stored size: 948 Bytes

Contents

$:.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'

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  # Use color in STDOUT
  config.color = true

  # Use color not only in STDOUT but also in pagers and files
  config.tty = true

  # Use the specified formatter
  config.formatter = :documentation # :progress, :html, :textmate
end

module ExampleWithGSL
  def it_only_with_gsl(name,&block)
    it(name) do
      if Distribution.has_gsl?
        instance_eval(&block)
      else
        skip("Requires GSL")  
      end
    end
  end
  
  def it_only_with_java(name,&block)
    it(name) do
      if Distribution.has_java?
        instance_eval(&block)
      else
        skip("Requires Java")  
      end
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
distribution-0.7.2 spec/spec_helper.rb