Sha256: 0fb2b1e41ac6300d5a003e9c2c468c52297c0b573459ebbf5d1205eeab90d2c3

Contents?: true

Size: 1.26 KB

Versions: 12

Compression:

Stored size: 1.26 KB

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
TEST_ORM = (ENV["TEST_ORM"] || :active_record).to_sym

if TEST_ORM == :mongoid
  require 'mongoid'
  require File.expand_path("../dummy_mongoid/config/environment.rb",  __FILE__)
else
  require File.expand_path("../dummy_activerecord/config/environment.rb",  __FILE__)
end
require "rails/test_help"
require "shoulda"
require "mocha/setup"
require "database_cleaner"

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

# Configure database cleaning
DatabaseCleaner.strategy = (TEST_ORM == :mongoid ? :truncation : :transaction)
class ActiveSupport::TestCase
  # Stop ActiveRecord from wrapping tests in transactions
  if TEST_ORM == :active_record
    self.use_transactional_fixtures = false
  end

  setup { DatabaseCleaner.start }
  teardown { DatabaseCleaner.clean }
end

# For generators
require "rails/generators/test_case"
require "generators/maestrano/install_generator"
require "generators/maestrano/user_generator"
require "generators/maestrano/group_generator"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
maestrano-rails-1.0.4 test/test_helper.rb
maestrano-rails-1.0.3 test/test_helper.rb
maestrano-rails-1.0.2 test/test_helper.rb
maestrano-rails-1.0.0 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC8 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC7 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC6 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC5 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC4 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC3 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC2 test/test_helper.rb
maestrano-rails-1.0.0.pre.RC1 test/test_helper.rb