Closed slarti42uk closed 12 years ago
your :email attribute is spelled wrong, try that first.
Cheers. I think that must have been a typo on here. I have checked the code and it's got the correct :email Must have hit a back space when formatting. Ooops
Ok so I found this answer over on stackoverflow: http://stackoverflow.com/questions/9137814/controller-spec-not-logging-in-my-factory-created-user
Seems that in the generated specs with the scaffolds there is a valid_session that conflicts with the factory user. The suggestion in the post is to remove it, which does work, but maybe there is a way to work with it.
Anyway this isn't an issue for here so I'll close it. Cheers
Thanks for the great application templates and tutorials!
I'm not sure that this is an issue with the template app or a wider issue but here goes. I'm using the template as a base for a prototype app that requires login for all parts of it. I've used the rails scaffolds to quickly add some functionality and this has created the rspec controller tests. These all run fine until I add
before_filter :authenticate_user!
to the controller and then all rspec controller tests fail.I've followed the steps from the Devise wiki and other stackoverflow posts about adding in the Devise test helpers into spec_helper.rb
and a before block into the controller test
I understand that cucumber should be used for the integration testing but I just want to find out if this is something that CAN work. I figure that the generated tests are there for free so every extra bit of test coverage is good, yes?
Thanks in advance.