11
votes
4answers
4k views

How to effectively unit test a controller in Ruby on Rails (please critique a sample RSpec)

I intend this to be a general question on writing an effective set of test cases for a controller action. I include the following ingredients: Ruby on Rails RSpec: A testing framework. I considered ...