Search code examples
ruby-on-railsrspeccucumberheartbeat

Testing Heartbeat controller


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

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.