I\'m trying to write a request test that asserts that the proper links appear on the application layout depending in whether a user is logged in or out. FWIW, I\'m using Dev
For future readers: I received same error, but for a different reason.
Our app had multiple user models where one derived from the other
For arguments sake:
class SimpleUser
class User < SimpleUser
In my controller I used a reference to SimpleUser (the parent class), but Devise was configured to use User (the child class).
During an invocation of Devise::Mapping.find_scope! it does .is_a? comparison against the object reference and the configured class.
Since my reference was a SimpleUser, and the configured class was User, the .is_a? fails because the comparison was asking if the Parent class is_a? Child class, which is always false.
Hope that helps someone else.