سؤال

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
هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top