Sha256: 3a99162a9a6b29420543cdb08a920048b6c412c2c1e6f3742009cd9586dc2cf2

Contents?: true

Size: 906 Bytes

Versions: 5

Compression:

Stored size: 906 Bytes

Contents

begin
  if RUBY_VERSION < '1.9'
    # require 'debug'
    # Debugger.start
  else
    require 'simplecov'
    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.0.2 spec/spec_helper.rb
csl-1.0.1 spec/spec_helper.rb
csl-1.0.0 spec/spec_helper.rb
csl-1.0.0.pre23 spec/spec_helper.rb
csl-1.0.0.pre22 spec/spec_helper.rb