Guest User

Untitled

a guest
Sep 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. rails_root = File.expand_path('../../', __FILE__)
  2. $LOAD_PATH.unshift(rails_root) unless $LOAD_PATH.include?(rails_root)
  3.  
  4. require 'bundler/setup'
  5. require 'active_record'
  6. require 'rspec/rails/extensions/active_record/base'
  7. require 'spec/support/require_helper'
  8. require 'spec/support/helpers'
  9. require 'ostruct'
  10. Bundler.require :models
  11.  
  12. database_yml = YAML.load_file(File.expand_path('config/database.yml'))
  13. ActiveRecord::Base.establish_connection(database_yml['test'])
  14.  
  15. I18n.load_path << Dir['config/locales/*.yml']
  16. I18n.locale = 'pt-BR'
  17. I18n.load_path.flatten!
Add Comment
Please, Sign In to add comment