I am trying to get a previously passing rspec \"view spec\" to pass after adding Devise\'s user_signed_in? method to the view template in question. The template
Have a look at Rails Composer, this will guide you through a new rails project creation with options like testing, UI etc..
Create a sample project, cool thing is it will create all the test for you including view testing with devise. Then you can get an idea from those testing specs.
worked for me :D
HTH
The error you're receiving is because you need to include the devise test helpers
Generally you'll add this (and you might already have) to spec/support/devise.rb
RSpec.configure do |config|
config.include Devise::TestHelpers, :type => :controller
end
But since you're creating a view spec, you'll want something like this:
RSpec.configure do |config|
config.include Devise::TestHelpers, :type => :controller
config.include Devise::TestHelpers, :type => :view
end