Sha256: 4044200267199782d5bb31311c401a3658bb58a40569cf3545d85da3d200018d

Contents?: true

Size: 1002 Bytes

Versions: 1

Compression:

Stored size: 1002 Bytes

Contents

require 'active_record'

begin
  require 'factory_girl'
rescue LoadError
end

rails_database_yaml_file_path         = File.expand_path('../../config/database.yml',       __FILE__)
rails_engine_database_yaml_file_path  = File.expand_path('../../dummy/config/database.yml', __FILE__)

database_yaml_file_path               = if File.exist? rails_engine_database_yaml_file_path
                                          rails_engine_database_yaml_file_path
                                        else
                                          rails_database_yaml_file_path
                                        end

connection_info                       = YAML.load_file(database_yaml_file_path)['test']

ActiveRecord::Base.establish_connection(connection_info)

Dir[File.expand_path('../factories/**/*.rb', __FILE__)].each { |f| require f }
Dir[File.expand_path('../support/**/*.rb',   __FILE__)].each { |f| require f }

RSpec.configure do |config|
  config.order = 'random'
  config.color = true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspectacular-0.3.0 lib/rspectacular/spec_helpers/active_record_spec_helper.rb