mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
Rails 5.1 requires ActionController::TestRequest to have a controller class
Pass it in as an anonymous class
This commit is contained in:
committed by
Justin Coyne
parent
36613b09d7
commit
7c4e8c8d17
@@ -3,7 +3,11 @@ unless defined?(DEVISE_ORM)
|
||||
end
|
||||
|
||||
module Devise
|
||||
# Detection for minor differences between Rails 4 and 5 in tests.
|
||||
# Detection for minor differences between Rails 4 and 5, and 5.1 in tests.
|
||||
def self.rails51?
|
||||
Rails.version.start_with? '5.1'
|
||||
end
|
||||
|
||||
def self.rails5?
|
||||
Rails.version.start_with? '5'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user