Displaying 1 result from an estimated 1 matches for "domains_url".
2007 Sep 30
9
Problems with testing nested routes using mocking
...virtual_hosts/1
def show
@virtual_host = @domain.virtual_hosts.find(params[:id])
respond_to do |format|
format.html # show.rhtml
end
end
private
def capture_domain
if params[:domain_id].blank?
flash[:notice] = ''Need domain.''
redirect_to domains_url
else
@domain = Domain.find(params[:domain_id])
end
end
end
#----
and
#----- virtual_host_controller_spec.rb
describe VirtualHostsController, "handling GET /domains/1/virtual_hosts/1" do
before do
@domain = mock_model(Domain)
@virtual_hosts = mock("vir...