How can I write a test to assert that the action new is rendered?
def method
...
render :action => :new
end
I’m looking for something like the lines below, but to assert that the action was called, not the template:
assert_equal layout, @response.layout
assert_equal format, @request.format
I know I can’t do @response.action
Thanks in advance!
Deb
My original answer is wrong. As @Mohammad El-Abid indicated below, the correct method is:
Original answer: