That's only works for controllers, not acceptance test.
On 12 ago, 14:38, Boris Barroso <
boriscy...@gmail.com> wrote:
> When you use devise with rspec and steak you should make some changes in
> your configuration.
> this is for rails3
https://github.com/plataformatec/devise/wiki/How-To:-Controllers-and-...
>
> 2011/8/12 Matias <
tute.uni...@gmail.com>
>
>
>
>
>
>
>
>
>
> > Im using rails 2.3.12 with Devise.
>
> > I create a helper:
>
> > def login_with(user)
> > visit "/users/sign_in"
> > fill_in "user_login", :with => user.email
> > fill_in "user_password", :with => user.password
> > click_on "Acceder"
> > end
>
> > And an acceptance test with:
>
> > let :user do
> > Factory.create :user
> > end
>
> > background do
> > login_with user
> > end
>
> > scenario "Promotor should see his money in the home panel" do
> > should_be_on user_panel
> > end
>
> > But the fail because the page is still users/sign_in. But the
> > misterious is that looking at page.body I doesn't see any error.
>
> --
> Boris Barroso
> *Senior Ruby on Rails, Javascript developer*