Sha256: 10a19f768cc2a3770382d40866da87683a9742e59d475f2ef4a85be98aedff3b

Contents?: true

Size: 820 Bytes

Versions: 18

Compression:

Stored size: 820 Bytes

Contents

begin
  require 'simplecov'
  require 'debugger'
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

18 entries across 18 versions & 1 rubygems

Version Path
csl-1.0.0.pre21 spec/spec_helper.rb
csl-1.0.0.pre20 spec/spec_helper.rb
csl-1.0.0.pre19 spec/spec_helper.rb
csl-1.0.0.pre18 spec/spec_helper.rb
csl-1.0.0.pre17 spec/spec_helper.rb
csl-1.0.0.pre16 spec/spec_helper.rb
csl-1.0.0.pre15 spec/spec_helper.rb
csl-1.0.0.pre14 spec/spec_helper.rb
csl-1.0.0.pre13 spec/spec_helper.rb
csl-1.0.0.pre12 spec/spec_helper.rb
csl-1.0.0.pre11 spec/spec_helper.rb
csl-1.0.0.pre10 spec/spec_helper.rb
csl-1.0.0.pre9 spec/spec_helper.rb
csl-1.0.0.pre8 spec/spec_helper.rb
csl-1.0.0.pre7 spec/spec_helper.rb
csl-1.0.0.pre6 spec/spec_helper.rb
csl-1.0.0.pre5 spec/spec_helper.rb
csl-1.0.0.pre4 spec/spec_helper.rb