Sha256: af177e914815014628f56e7def69ebdd939739c56971076ea1d1b35d661c8a22

Contents?: true

Size: 1.11 KB

Versions: 11

Compression:

Stored size: 1.11 KB

Contents

if RUBY_VERSION >= '1.9' && RUBY_ENGINE == 'ruby' # remove RUBY_ENGINE test when rubinius-coverage fix is released
  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'
begin
  require 'redgreen'
rescue LoadError
end

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

for file in %w[model_stub const_mocker company]
  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

Object.send :remove_const, :Config
class ColumnMock < ActiveScaffold::Tableless::Column; end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
active_scaffold-3.4.10 test/test_helper.rb
active_scaffold-3.4.9 test/test_helper.rb
active_scaffold-3.4.8 test/test_helper.rb
active_scaffold-3.4.7 test/test_helper.rb
active_scaffold-3.4.5 test/test_helper.rb
active_scaffold-3.4.4 test/test_helper.rb
active_scaffold-3.4.3 test/test_helper.rb
active_scaffold-3.4.2 test/test_helper.rb
active_scaffold-3.4.1 test/test_helper.rb
active_scaffold-3.4.0.1 test/test_helper.rb
active_scaffold-3.4.0 test/test_helper.rb