Tagged Questions
1
vote
1answer
121 views
How to refactor my controller specs?
In my project (https://github.com/GCorbel/comment-my-projects) I have this kind of code to test my controllers.
#encoding=utf-8
require 'spec_helper'
describe ProjectsController do
let!(:project) ...
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 ...