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 +```