[rspec-users] Grabbing the controller name before a new test case

Matt Wynne matt at mattwynne.net
Thu Oct 1 03:56:18 EDT 2009


On 1 Oct 2009, at 00:56, Hates_ wrote:

> I currently have:
>
> describe Publishers::PagesController
>
> I want to be able to grab the path "publishers/pages/ and use that to
> generate a load of tests automatically. Problem is I can't figure out
> how to do it outside of my "it" block.
>
> Any help is greatly appreciated.

Can't remember exactly, but it's something like self.described_type

cheers,
Matt

http://mattwynne.net
+447974 430184



More information about the rspec-users mailing list