From 38b6ac8ae16e7d047c018f41f896bead6f57e8ab Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Fri, 27 May 2016 11:51:51 +0800 Subject: [PATCH] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 03ab7e3..58328fb 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,8 @@ And if you are use Devise, you can read this to add validation: [RuCaptcha with ### Write your test skip captcha validation +for RSpec + ```rb describe 'sign up and login', type: :feature do before do @@ -120,3 +122,16 @@ describe 'sign up and login', type: :feature do it { ... } end ``` + +for MiniTest + +```rb +class ActionDispatch::IntegrationTest + def sign_in(user) + ActionController::Base.any_instance.stubs(:verify_rucaptcha?).returns(true) + post user_session_path \ + 'user[email]' => user.email, + 'user[password]' => user.password + end +end +```