Sha256: f69b793b553cb305f8661feaf17e02118fe3c7f62eae6bdf0372b99fbf9a8912

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

require 'rubygems'
require 'simplecov'
require 'coveralls'
Coveralls.wear!

resultset_path = SimpleCov::ResultMerger.resultset_path
FileUtils.rm resultset_path if File.exists? resultset_path
SimpleCov.use_merging true
SimpleCov.at_exit do
  SimpleCov.command_name "fork-#{$$}"
  SimpleCov.result.format!
end
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  Coveralls::SimpleCov::Formatter
]
SimpleCov.start do
  add_filter 'spec/'
end

ENV['RACK_ENV'] = 'test'

require 'rack'
begin
  require 'rails'
  $stdout.write "* Rails has been loaded.\n"
rescue LoadError
end
begin
  require 'i18n'
  $stdout.write "* I18n has been loaded.\n"
  I18n.enforce_available_locales = true
  I18n.available_locales = [:ja, :en]
rescue LoadError
end
require 'rack-dev-mark'

Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f| require f }

RSpec.configure do |config|
  config.before :each do
    @rack_env = ENV['RACK_ENV']
    @rails_env = ENV['RAILS_ENV']
  end
  config.after :each do
    ENV['RACK_ENV'] = @rack_env
    ENV['RAILS_ENV'] = @rails_env
    Rack::DevMark.env = nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-dev-mark-0.7.1 spec/spec_helper.rb
rack-dev-mark-0.7.0 spec/spec_helper.rb