Sha256: 6c6ac22215dada1d4400ae0f0ec1f9d38c5de12550e2dbcae5ab71db67cbbb6f

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

begin
  require 'simplecov'
  require 'coveralls' if ENV['CI']
rescue LoadError
  # ignore
end

begin
  case
  when RUBY_PLATFORM < 'java'
    require 'debug'
    Debugger.start
  when defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
    require 'rubinius/debugger'
  else
    require 'debugger'
  end
rescue LoadError
  # ignore
end

require 'rexml/document'
require 'nokogiri'

require 'csl'

module SilentWarnings
  require 'stringio'
  #
  # Adapted form silent_warnings gist by @avdi
  # https://gist.github.com/1170926
  #
  def silent_warnings
    original_stderr = $stderr
    $stderr = StringIO.new
    yield
  ensure
    $stderr = original_stderr
  end
end

RSpec.configure do |config|
  config.include(SilentWarnings)

  config.before :all do
    @style_root, @locale_root = CSL::Style.root, CSL::Locale.root

    CSL::Style.root  = File.expand_path('../fixtures/styles',  __FILE__)
    CSL::Locale.root = File.expand_path('../fixtures/locales', __FILE__)
  end

  config.after :all do
    CSL::Style.root, CSL::Locale.root = @style_root, @locale_root
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
csl-1.2.3 spec/spec_helper.rb
csl-1.2.2 spec/spec_helper.rb
csl-1.2.1 spec/spec_helper.rb
csl-1.2.0 spec/spec_helper.rb
csl-1.1.0 spec/spec_helper.rb