Sha256: acba74ea2c7ac83885bcc56dff13364880158bdb1228a98e0e2145c10f743804

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

if RUBY_ENGINE == 'ruby'
  require 'simplecov'
  SimpleCov.start { add_filter 'test' }
end

ENV['RAILS_ENV'] = 'test'
require 'mock_app/config/environment'
require 'rails/test_help'
require 'minitest/autorun'
require 'mocha/setup'

require 'minitest/reporters'
Minitest::Reporters.use!

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start

def load_schema
  stdout = $stdout
  $stdout = StringIO.new # suppress output while building the schema
  load File.join(Rails.root, 'db', 'schema.rb')
  $stdout = stdout
end
load_schema

%w(model_stub const_mocker company).each do |file|
  require File.join(File.dirname(__FILE__), file)
end

I18n.backend.store_translations :en, YAML.load_file(File.expand_path('../../config/locales/en.yml', __FILE__))['en']

unless defined? Minitest::Test
  class Minitest::Test < MiniTest::Unit::TestCase
  end
end

class MiniTest::Test
  protected

  def config_for(klass, namespace = nil)
    ActiveScaffold::Config::Core.new("#{namespace}#{klass.to_s.underscore.downcase}")
  end
end

Config = RbConfig # HACK needed some comments

class ColumnMock < ActiveScaffold::Tableless::Column; end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
active_scaffold-3.4.41.1 test/test_helper.rb
active_scaffold-3.4.41 test/test_helper.rb
active_scaffold-3.4.40 test/test_helper.rb
active_scaffold-3.4.39 test/test_helper.rb
active_scaffold-3.4.38 test/test_helper.rb
active_scaffold-3.4.37 test/test_helper.rb
active_scaffold-3.4.36 test/test_helper.rb