Question

I'm currently writing tests for an app using cucumber and rspec. I was asked to test the heartbeat controller, but I'm not really sure how to approach it.

module Api
    class HeartbeatController < ActionController::Base
        respond_to :json, :xml

        include Something::Status

        def status
            respond_with status_response
        end
    end
end
Was it helpful?

Solution

I just visited the xml and json paths and checked for certain distinct keywords to make sure it was responding the way I expected it to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top