1

我目前正在使用 cucumber 和 rspec 为应用程序编写测试。我被要求测试心跳控制器,但我不确定如何处理它。

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

        include Something::Status

        def status
            respond_with status_response
        end
    end
end
4

1 回答 1

0

我刚刚访问了 xml 和 json 路径并检查了某些不同的关键字,以确保它以我期望的方式响应。

于 2011-11-08T23:17:55.810 回答