开发者

Other Cucumber tests fail after I installed devise

开发者 https://www.devze.com 2023-02-18 17:54 出处:网络
I installed Devise, and all of my cucumber tests are now failing because I require the user to login. This makes sense.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消