[rspec-users] Spec'ing Inherited Resource Controllers
dchelimsky at gmail.com
Thu Dec 24 08:50:34 EST 2009
On Thu, Dec 24, 2009 at 1:45 AM, Juanma Cervera <lists at ruby-forum.com>wrote:
> I am trying to write the specs for controllers that use
> Can somebody tell me if this is possible?
> I have read that I have to use integrated_views, but even in that case
> it doesn't work.
> I have posted a message in the InheritedResources group and Jose Valim,
> has answered, telling something about responders used in
> InheritedResources and Rails 3.
> This is the link for the message in that group.
> The sample specs are written with Remarkable (only for give a shorter
> example), but the problems are the same when I write specs like in the
> Rspec book.
> response.should redirect_to(path)
> and response.should render_template("new") both fails.
> I would thank anybody that could give me some clue for a solution that I
> could try.
> And a question, which is the state of rspec with Rails 3?
> Is this going to change and I have to pospone the use of rspec with
> InheritedResource until then?
I haven't taken the time to look at inherited resources yet, so I can't help
you with that issue. As José suggests, rspec does not monkey patch render if
integrate_views is set to true, so I'm not sure what the conflict would be.
In terms of rspec-rails for rails 3, we haven't started work on it yet, but
plans are being formulated as we speak, and I'll be posting about them soon.
Loosely, the plan is to do a preview release shortly after the initial
rails-3 preview release, and then a final release of rspec-rails-2.0 right
after the final release of rails-3.0. This will be a significant re-write of
the rspec-rails, and will rely primarily on APIs exposed by rspec and rails,
which should help to avoid conflicts like the one you are now experiencing.
Thank you very much.
> Juan M. Cervera
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users