Sha256: 786466a26c268ca52e462ce585ab9a84aa919bc33f2ff8024903dda2f0ddba14

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

require 'coveralls'
Coveralls.wear!

# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'

require File.expand_path("../dummy/config/environment.rb", __FILE__)
require 'rails/test_help'
require 'dummy/config/environment'

Rails.backtrace_cleaner.remove_silencers!

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

# Load fixtures from the engine
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
end

require 'rails/generators/test_case'

class ActiveSupport::TestCase

  def i18n_backend_folder
    File.expand_path('tmp/yml', __FILE__)
  end

  def setup_i18n_backend
    I18n.backend = I18n::Backend::Simple.new
    I18n.load_path = Dir[Rails.root.join(i18n_backend_folder, '*.{rb,yml}').to_s]
    I18n.enforce_available_locales = false
    I18n.backend.reload!
  end
  def reload_i18n_path
    I18n.load_path += Dir[Rails.root.join(File.expand_path('../../tmp/yml', __FILE__), '*.{rb,yml}').to_s]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_admin_utils-1.1.0 test/test_helper.rb