[rspec-users] Persisting Logins and Sessions across scenarios

James Byrne lists at ruby-forum.com
Mon Jan 12 13:47:07 EST 2009


Aslak Hellesøy wrote:
> On Mon, Jan 12, 2009 at 6:21 PM, David Chelimsky 
> <dchelimsky at gmail.com>wrote:
> 
>> >    Then they should see the "entities" page
>> >    Then I should save the entity information successfully
>> >  response.body.should =~ /Add a New Entity/m
>>
> And coupling scenarios (or any kind of automated test - regardless of
> framework) is a very bad idea.
> 
> Aslak

I do not have a problem with putting :

  Given I am logged in as "myuser"

At the start of every scenario, but is there no way of performing the 
actual log in once, place the session info into an instance variable and 
then use that rather than actually starting up a new session each and 
every time?
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list