google-code-export / rubycas-client

Automatically exported from code.google.com/p/rubycas-client
1 stars 1 forks source link

How to authenticate during cucumber tests? #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We have a cucumber test suite for an application that we've just started to
implement rubyCAS authentication on top of. Previously we were using
restful_authentication, so it was fairly easy to add mock-authentication to
our rake-tests and cucumber tests.

Now we've removed the restful_auth and put rubyCAS on top.
Updating the rake-tests was easy - just stub out the CASFilter to return
true/false (as needed) and stuff our user's credentials into the session by
hand.

But I have no clue how to do similar things for cucumber as it seems to
operate at a distance to the internals of the app (which is kinda the
point). So faking up the authentication is a little more difficult.

Have you used cucumber on a rubycas-client-enhanced app? If so - how?

Not that it probably matters, but we're currently using rubycas-client
2.1.0 as a gem (though we'll bundle it as soon as we decide to go live) and
the gunark-rubycas-server gem too.

Cheers,
Taryn

Original issue reported on code.google.com by taryne...@gmail.com on 8 Dec 2009 at 10:01

GoogleCodeExporter commented 9 years ago
Sorry, I don't use cucumber myself, so I'm probably not the best person to 
tackle 
this, but I understand this is something worthy of addressing. Hopefully 
someone with 
expertise can take this on.

Original comment by matt.zuk...@gmail.com on 13 Apr 2010 at 7:32