-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
controller.controller_path is inferred from the rendered template.
This spec
describe "table/some_action", :focus => true do
it "should have an input in the form" do
render :template => 'table/some_action'
controller_path.should == 'table'
end
endpasses, while this spec
describe "table views" do
describe "table/some_action", :focus => true do
it "should have an input in the form" do
render :template => 'table/some_action'
controller_path.should == 'table'
end
end
endfails as controller_path is empty.
I think it would be fair to expect that wrapping such an example group in another should not break the spec.
This took me a while to figure out. I did not realize that controller path was used for
url_for(:action => 'x') and
render(:partial => 'y') Just saw strange errors indicating that there was something wrong with my controller in some (actually a lot but not all) of my view specs.
Cheers
Rob
Metadata
Metadata
Assignees
Labels
No labels