Skip to content

Instantly share code, notes, and snippets.

@alvinsng
Created May 2, 2018 23:08
Show Gist options
  • Select an option

  • Save alvinsng/8eabd6b70351680cb7f2e553ce08ce99 to your computer and use it in GitHub Desktop.

Select an option

Save alvinsng/8eabd6b70351680cb7f2e553ce08ce99 to your computer and use it in GitHub Desktop.
# in config/environment.rb
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Rails.application.initialize!
# If in Spring & test env, load spec_helper.rb
if ENV['SPRING_ENV'] == 'test' && ENV['RAILS_ENV'] == 'test'
require File.expand_path('../../spec/spec_helper', __FILE__)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment