[rspec-users] controller_name with dynamic controllers
dchelimsky at gmail.com
Mon Mar 19 07:10:59 EDT 2007
On 3/19/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
> I'm writing a controller which should only be inherited from,
> something like the generic crud controller seen here: http://
> Now, in my spec, I would like to create a controller which inherits
> from the generic CRUDController, without actually creating the
> controller. This controller is *only* for testing.
> How can I do this? I can't do something like this:
> Object.const_set("MyCrudController", Class.new(CRUDController))
TestingCrudController = Class.new(CRUDController)
> because the method "controller_name" will complain of setting the
> constant twice.
> Any ideas?
> Scott Taylor
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users