Little addition to your Rails test suite:
module ActionController
class AbstractResponse
StatusCodes::SYMBOL_TO_STATUS_CODE.each do |symbol, code|
define_method("#{symbol}?") { self.code == code.to_s } unless instance_methods.include?("#{symbol}?")
end
end
end
You can now assert your favorite status code:
post :create, params assert response.created?
And with RSpec, you too can be that glorious status code:
post :create, params response.should be_created