Hi, guys,
I refered to
https://github.com/plataformatec/devise as I'm trying
to get my view specs updated to use with Devise.
My views were written in rspec2 and the application runs on rails
3.0.9.
I have done what the reference above asks for:
1) ran 'rails generate devise:views' to set up the views. My model/
role is called 'User' (default)
2) created a new file, 'spec/support/devise.rb' and added the
following contents:
RSpec.configure do |config|
config.include Devise::TestHelpers, :type => :controller
end
When I run the application ('script/rails server'),
devise does work as in, I can sign up, login and logout.
Nevertheless, When I run 'rake spec:views', I noticed that sign_in,
which is a devise test helper is not included.
What is missing?
thank you.
Other efforts:
===============
a) I have also looked at
https://github.com/plataformatec/devise/wiki/How-To:-Controllers-and-Views-tests-with-Rails-3-(and-rspec)
which in the view spec:
1) requires 'spec_helper' and 'devise/test_helpers'
2) defined the let block for :user and before hook for assigning a
user object
b) Looked at
https://github.com/RailsApps/rails3-devise-rspec-cucumber
which is an example of rails 3, devise , rspec and cucumber. Noticed
it did not have any view specs.