[rspec-users] Specs and Libs

Andrew WC Brown omen.king at gmail.com
Fri Oct 5 22:29:43 EDT 2007


AuthenticatedSystem library has tests already written for it.
Just as Jim said you needn't write specs for it.

But if you did want to write spec's for the AuthenticatedSystem then you'd
create a directory inside the plugin directory with all the other directory
and files pointing the paths to the files you want to spec.

I'm sure it would be good practice to write spec's for a plugin but like Jim
said its practice to assume that the plugin should work.

On 10/5/07, James Deville <james.deville at gmail.com> wrote:
>
> Since it's a plugin, then I would not spec it, and spec the files that use
> it instead.
>
> Jim Deville
>
> On 10/4/07, Nathan Sutton < nathan.sutton at gmail.com> wrote:
> >
> > How would I go about writing specs for a lib, particularly one with
> > all protected and private methods.  I'm trying to spec the
> > AuthenticatedSystem library from the rails restful_authentication
> > plugin:
> > http://pastie.caboo.se/103625
> >
> > Also, when you're mocking objects, a side-effect is helping you
> > define the api of the object.  Is there a way to get all the
> > behaviors that have been mocked for a class and its objects?  Is
> > there a way to automagically compare the output against what is
> > actually defined?
> >
> > Thanks,
> >
> > Nate "fowlduck" Sutton
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> >
>
>
> _______________________________________________
> 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/20071005/7bbd00ff/attachment.html 


More information about the rspec-users mailing list