[rspec-users] Specifying a few valid values

David Chelimsky dchelimsky at gmail.com
Thu Jul 17 10:40:01 EDT 2008


On Thu, Jul 17, 2008 at 9:37 AM, Zach Dennis <zach.dennis at gmail.com> wrote:
> Perhaps...
>
>  When "I login with invalid credentials"
>  Then "I see that I have not been logged in"

Or ....

When I login with invalid credentials
Then I should see the login form
And I should see a message saying "Something went wrong."


>
> And in your implementation of the Then you could make sure they are at
> the login form still.
>
> Zach
>
>
>
>
> On Thu, Jul 17, 2008 at 10:19 AM, Jonathan Leighton
> <j at jonathanleighton.com> wrote:
>> On Thu, 2008-07-17 at 08:50 -0500, David Chelimsky wrote:
>>> Are you familiar with Webrat?
>>
>> Yep, we are using it. However, I want to test what happens when invalid
>> data is entered - that's the reason to specify that the form gets shown.
>> What would you consider a better approach to verify the user sees the
>> form again, instead of moving on through the application? I guess I
>> could test that they *don't* get redirected?
>>
>> Cheers,
>> Jon
>>
>> --
>> Jonathan Leighton
>> http://jonathanleighton.com/
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
>
>
> --
> Zach Dennis
> http://www.continuousthinking.com
> http://www.mutuallyhuman.com
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list