I’ve been having issues with my namespaced controllers and specs. I
receive the following errors only on my create and update actions
(with invalid parameters) and only on my namespaced controllers. My
non-namespaced controllers have similar specs and work well. The
application works as expected, but the specs are reporting:
Failures:
Management::CountriesController POST create with invalid params
re-renders the ‘new’ template
Failure/Error: response.should render_template(:new)
expecting <“new”> but rendering with <“”>
Management::CountriesController PUT update with invalid params re-
renders the ‘edit’ template
Failure/Error: response.should render_template(:edit)
expecting <“edit”> but rendering with <“”>
An empty response body tells me it’s redirecting. Couple ways to check
that:
1.) Use “puts” and “raise” to see if it even gets to the respond_with
2.) Look at the test logs to see what it’s responding with.
3.) Use response.response_code.should eq(200)
An empty response body tells me it’s redirecting. Couple ways to check
that:
1.) Use “puts” and “raise” to see if it even gets to the respond_with
2.) Look at the test logs to see what it’s responding with.
3.) Use response.response_code.should eq(200)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.