From e0e41d88d558d2cc0f035effef486db0862f62a5 Mon Sep 17 00:00:00 2001 From: Guillaume DOTT Date: Tue, 15 Jan 2013 09:21:33 +0100 Subject: [PATCH] Return true when plain captcha is used in test env --- lib/really_simple_captcha/captcha/plain_captcha.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/really_simple_captcha/captcha/plain_captcha.rb b/lib/really_simple_captcha/captcha/plain_captcha.rb index 3ff54b2..73ec584 100644 --- a/lib/really_simple_captcha/captcha/plain_captcha.rb +++ b/lib/really_simple_captcha/captcha/plain_captcha.rb @@ -53,6 +53,8 @@ module ReallySimpleCaptcha::Captcha module ControllerHelpers def plain_captcha_valid? + return true if Rails.env.test? + res = params[PlainCaptcha.field_name] == session[PlainCaptcha.field_name] session[PlainCaptcha.field_name] = nil