Sha256: 774830f8ce6b0332dcf33df702064f66b6d5388f53eba6153a164502500131c6

Contents?: true

Size: 734 Bytes

Versions: 2

Compression:

Stored size: 734 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'bundler'
Bundler.setup

%w(support shared).each do |dir|
  Dir.glob(File.expand_path("../#{dir}/**/*.rb", __FILE__), &method(:require))
end

require 'multi_mime'

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  def jruby?
    defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
  end

  def undefine_constants(*consts)
    values = {}
    consts.each do |const|
      if Object.const_defined?(const)
        values[const] = Object.const_get(const)
        Object.send :remove_const, const
      end
    end
    yield
  ensure
    values.each do |const, value|
      Object.const_set const, value
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
multi_mime-1.1.0 spec/spec_helper.rb
multi_mime-1.0.1 spec/spec_helper.rb