[rspec-devel] [ rspec-Bugs-6895 ] should_render :action doesn't seem to work

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 26 18:49:00 EST 2006


Bugs item #6895, was opened at 2006-11-26 23:27
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6895&group_id=797

>Category: rails plugin
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 3
Submitted By: Pat Maddox (pergesu)
>Assigned to: David Chelimsky (dchelimsky)
Summary: should_render :action doesn't seem to work

Initial Comment:
0.7.3, edge rails, if I do

  specify "should show the form" do
    controller.should_render :action => "new"
  end

Then I get {:action=>"new"} should == {:template=>"people/new"}.  Doing should_render :template => "people/new" works fine.

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-26 23:49

Message:
That's how this is supposed to work. This is really a documentation issue.

The only time you would use :action is if you were redirecting to another action. Otherwise you should use :template => ...

I've added a documentation request for this:

http://rubyforge.org/tracker/index.php?group_id=797&atid=9738

----------------------------------------------------------------------

Comment By: Pat Maddox (pergesu)
Date: 2006-11-26 23:44

Message:
The controller code is the very simple

  def new
    @person = Person.new
  end

with a corresponding new.rhtml file.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-26 23:36

Message:
What is in the controller code?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6895&group_id=797


More information about the rspec-devel mailing list