Skip to content

Fix spec load error with Rails 6 #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@
# require "action_mailer/railtie"
# require "sprockets/railtie"

# Workaround for Rails 6 requiring Logger before ActiveSupport modules
require 'logger'
require 'rails/all'
# require "rails/test_unit/railtie"

5 changes: 5 additions & 0 deletions spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -33,4 +33,9 @@

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

# Allow unsafe YAML loading for tests with Rails >= 6
if defined?(ActiveRecord::Base) && ActiveRecord::Base.respond_to?(:use_yaml_unsafe_load=)
ActiveRecord::Base.use_yaml_unsafe_load = true
end
end