[rspec-users] What do you think of this controller spec?
pergesu at gmail.com
Thu Jan 18 14:51:33 EST 2007
On 1/18/07, Bryan Liles <bryan at osesm.com> wrote:
> On Dec 26, 2006, at 12:08 PM, Pat Maddox wrote:
> > On 12/25/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> >> On 12/24/06, Pat Maddox <pergesu at gmail.com> wrote:
> >>> Here's a controller spec I wrote, it's for a very simple RESTful
> >>> controller (well, aren't all RESTful controllers simple? :)
> >>> I've created a couple spec helper methods to refactor some of the
> >>> common code...for example, require_login_and_correct_user creates
> >>> two
> >>> specifications: one for when the user isn't logged in, and one when
> >>> the user is logged in but requests someone else's book. do_request
> >>> automatically calls do_get/post/put/delete depending on what's
> >>> implemented.
> > Here's the code with the incorporated changes:
> > spec_helper.rb: http://pastie.caboo.se/29577
> > books_controller_spec.rb: http://pastie.caboo.se/29578
> I'm trying to follow your example, but the include command isn't
> extending what ever class my context runs in.
More information about the rspec-users