Grabbing the controller name before a new test case

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.

Richard

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

On Oct 1, 8:56 am, Matt W. [email protected] wrote:

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

Cheers, that was it exactly!

On Thu, Oct 1, 2009 at 1:45 PM, Zach D. [email protected]
wrote:

Your name has intrigued me. Do you really hate underscores? :slight_smile:

Some people are ReallyPassionateAboutCamelCase.


Have Fun,
Steve E. ([email protected])
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org

On Oct 1, 7:27 pm, Stephen E. [email protected] wrote:

On Thu, Oct 1, 2009 at 1:45 PM, Zach D. [email protected] wrote:

Your name has intrigued me. Do you really hate underscores? :slight_smile:

Some people are ReallyPassionateAboutCamelCase.

Underscores make me livid! :smiley:

Your name has intrigued me. Do you really hate underscores? :slight_smile:

Zach

On Wed, Sep 30, 2009 at 7:56 PM, Hates_ [email protected]
wrote:

Richard


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users


Zach D.
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
http://ideafoundry.info/behavior-driven-development (first rate BDD
training)
@zachdennis (twitter)

On Thu, Oct 1, 2009 at 2:33 PM, Hates_ [email protected]
wrote:

On Oct 1, 7:27 pm, Stephen E. [email protected] wrote:

On Thu, Oct 1, 2009 at 1:45 PM, Zach D. [email protected]valid wrote:

Your name has intrigued me. Do you really hate underscores? :slight_smile:

Some people are ReallyPassionateAboutCamelCase.

Underscores make me livid! :smiley:

How.do.you.feel.about.dots?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs