Sha256: bb777cfec54e37eceebde0881f17f708d6bc1f3d8b02915d6d6f36a26bb83f7e

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

ENV["RAILS_ENV"] ||= 'test'

require File.expand_path("../dummy/config/environment", __FILE__)

require 'rspec/rails'
require 'rspec/autorun'
require 'factory_girl_rails'
require 'haml'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f }

Carmen.i18n_backend.load_path << (Carmen.root_path.to_s + '/locale/en/world.yml')
Carmen.i18n_backend.load_path << (Carmen.root_path.to_s + '/locale/en/world/ca.yml')
Carmen.i18n_backend.load_path << (Carmen.root_path.to_s + '/locale/en/world/us.yml')

RSpec.configure do |config|
  config.fixture_path = "#{::Rails.root}/spec/fixtures"

  Rails.logger.level = 4    # Output only minimal stuff to test.log

  config.use_transactional_fixtures = true   # Make this false to once again use DatabaseCleaner
  config.infer_base_class_for_anonymous_controllers = false
  config.order = 'random'
end

class ActiveRecord::Base
  mattr_accessor :shared_connection
  @@shared_connection = nil

  def self.connection
    @@shared_connection || retrieve_connection
  end
end

# Forces all threads to share the same connection. This works on
# Capybara because it starts the web server in a thread.
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
effective_addresses-0.1 spec/spec_helper.rb