-
-
Save microwaves/2220164 to your computer and use it in GitHub Desktop.
unit_spec_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails_root = File.expand_path('../../', __FILE__) | |
$LOAD_PATH.unshift(rails_root) unless $LOAD_PATH.include?(rails_root) | |
require 'bundler/setup' | |
require 'active_record' | |
require 'rspec/rails/extensions/active_record/base' | |
require 'spec/support/require_helper' | |
require 'spec/support/helpers' | |
require 'ostruct' | |
Bundler.require :models | |
database_yml = YAML.load_file(File.expand_path('config/database.yml')) | |
ActiveRecord::Base.establish_connection(database_yml['test']) | |
I18n.load_path << Dir['config/locales/*.yml'] | |
I18n.locale = 'pt-BR' | |
I18n.load_path.flatten! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails_root = File.expand_path('../../', __FILE__) | |
$LOAD_PATH.unshift(rails_root) unless $LOAD_PATH.include?(rails_root) | |
require 'spec/support/require_helper' | |
require 'spec/support/matchers' | |
require 'i18n' | |
I18n.load_path << Dir['config/locales/*.yml'] | |
I18n.locale = 'pt-BR' | |
I18n.load_path.flatten! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment