How do I test a controller with rspec-rails? -


I want to test that my editing recipe page uses RSPC, although it is not root for

My current test looks like this

Pre> Description "Show recipe to edit" "edit it should display the recipe page" Get: Edit Feedback Should have feedback. Render_template render_template (edit) Ending

"post-text" itemprop = "text">

problem < P>

In your example, the code required to actually test the controller object does not include the resize controller in your imagination.

Solution

Ensure that your controller stays under specs / controllers or is set to clear type: controller after that, in fact a controller Describes, either using the built-in subject or establishing a controller instance in the first or test block. As the most basic example:

  Describe RecipeController # Take a few tests using the RecipeController.new end   

read more



Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -