Sha256: 0e745cce5c0c46d65aa6aa29ae9d5c229fd0bad568edfd111a492f9f96195166

Contents?: true

Size: 1.08 KB

Versions: 20

Compression:

Stored size: 1.08 KB

Contents

require 'simplecov'
SimpleCov.start { add_filter 'test' }

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

20 entries across 20 versions & 1 rubygems

Version Path
active_scaffold-3.4.35 test/test_helper.rb
active_scaffold-3.4.34 test/test_helper.rb
active_scaffold-3.4.33 test/test_helper.rb
active_scaffold-3.4.32 test/test_helper.rb
active_scaffold-3.4.31 test/test_helper.rb
active_scaffold-3.4.30 test/test_helper.rb
active_scaffold-3.4.29 test/test_helper.rb
active_scaffold-3.4.28 test/test_helper.rb
active_scaffold-3.4.27 test/test_helper.rb
active_scaffold-3.4.26 test/test_helper.rb
active_scaffold-3.4.25 test/test_helper.rb
active_scaffold-3.4.24 test/test_helper.rb
active_scaffold-3.4.23 test/test_helper.rb
active_scaffold-3.4.22 test/test_helper.rb
active_scaffold-3.4.21.1 test/test_helper.rb
active_scaffold-3.4.21 test/test_helper.rb
active_scaffold-3.4.20 test/test_helper.rb
active_scaffold-3.4.19 test/test_helper.rb
active_scaffold-3.4.18.1 test/test_helper.rb
active_scaffold-3.4.18 test/test_helper.rb