誰かが、Shoulda、Factory Girl、および Mocha を使用して Captcha 検証 + Authlogic をテストするための戦略/コード サンプル/ポインターを提供できますか?
たとえば、私の UsersController は次のようなものです。
class UsersController < ApplicationController
validates_captcha
...
def create
...
if captcha_validated?
# code to deal with user attributes
end
...
end
この場合、Shoulda / Factory Girl / Mocha を使用してどのようにモック/スタブを作成し、Captcha 画像に対する有効な応答と無効な応答をテストしますか?
あなたの助けに感謝します、シヴァ