Hello!
Thanks a lot Luismi, with the first link I got it up and running in no
time. I just did this:
feature "Home page:" do
include Warden::Test::Helpers
background do
@user = User.create(...) # Or use fixtures, factories or whatever,
even a stub user
login_as @user
visit home_page
end
...
after do
User.delete_all
Warden.test_reset!
end
end
And it works flawlessly. Moreover, it doesn't depend on which strategy
you use with Devise or whatever, since it affects only Warden! Great.
Thank you guys! Maybe this should be posted on the recently created
"Resources" page on steak repo! I bet this will save a lot of time to
many people ;)
Josep M. Bach
On 24 ago, 17:37, Luismi Cavallé <
lmcava...@gmail.com> wrote:
> If I'm not wrong in the first link it doesn't rely on the presence of a current controller. It looks more like an integration test. You might be right about the second link.
>
> -- Luismi
>
> On Aug 24, 2010, at 5:25 PM, Pessoal wrote:
>
>
>
> > Hello Luismi,
>
> > I don't think it will work because in steak we don't have access to things like current controller (that we have in Rspec normal controllers specs). So try to stub things related to views and controllers will not work.
>
> > Cheers,
> > Daniel Lopes
>