I installed Devise, and all of my cucumber tests are now failing because I require the user to login. This makes sense.
Is there a way to specify that a user is logged in WITHOUT going through a senario such as this:
> Scenario: C开发者_高级运维reate Issue
> Given I am on the home page
> When I fill in "Email" with "justin@gmail.com"
> And I fill in "Password" with "secret"
> And I press "Sign in"
> Then I am on the list of issues
I tried something like the following: user_signed_in? = true
but this fails. Help please.
As seen in this guide, you can factor out that code into multiple matchers to help reduce duplication. More specifically I'd look at the Given /^I am a new, authenticated user$/ do
block.
精彩评论