It feels to me as though you might be working too hard, why not break
this down just a bit so you can just use the webrat steps provided for
you.
For example, I I wanted to specify that a user would be redirected to
the login page when he wasn't logged in, after the steps necessary to
set up a user who isn't logged in I might just say
When I visit the family jewels page
Then I should be on the login page
and all you need to do is put the code in features/support/paths.rb to
map "the family jewels page" and "the login page" to the right urls.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
> Is paths.rb only for Rails apps, or can I use it for Mechanize
> sessions?
I don't know.
There's nothing rails specific about the idea, it's a method called by
the webrat steps which consists basically of a case stament mapping
user level descriptions to a uri.
It's probably generated by cucumber/rails though. so..
If it is it might be worth while to generate an empty rails app and
then script/generate cucumber and look in the features directory to
see what you get, it might be worthwhile to use that as a model for
how to structure things even for non-rails stuff.