[rspec-users] Test for a gem/plugin?

Andrew Premdas apremdas at gmail.com
Thu Dec 11 02:53:48 EST 2008


I put a starter application with a bunch of features to test authorisation
code implemented by Restful Authentication on Github a few days ago. In
theory you could apply these features directly to your Authlogic
implementation.
http://github.com/diabolo/fbrp/tree/master


All best

Andrew

2008/12/10 James Byrne <lists at ruby-forum.com>

> Ashley Moran wrote:
>
> >
> > Don't confuse library code with code you write to use this library.
> > The AuthLogic config in your app is code too, and it adds behaviours
> > to your app.  The fact there are 10, 100 or 10,000 lines of code
> > behind it is irrelevant.
>
> So, if I understand you correctly, then I should write features somewhat
> like this:
>
> Scenario: A known user signs in successfully
>  Given a known user "myuser" with a password "myuserpassword"
>  When user "myuser" signs on with a password "myuserpassword"
>  Then user "myuser" is authenticated
>    And the user sees a sign in success message
>
> Scenario: A known user does not sign in successfully
>  Given a known user "myuser" with a password "myuserpassword"
>  When user "myuser" signs in with a password "anotherpassword"
>  Then user "myuser" is not authenticated
>    And the user sees a sign in failure message
>    And the user sees the sign in page
>
> And I should simply not worry about what is provided by authlogic, other
> than the requisite behaviour as exhibited in this application.
>
>
> >
> > Hope this gives another perspective on the subject.
> >
>
> I am still grappling with the entire concept.  A "perspective" graces
> what I as yet possess with too much dignity.
>
> Thanks.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081211/425a2cc2/attachment.html>


More information about the rspec-users mailing list