robertfarese said about 6 years ago on Invisible Captcha :
Hi everyone! I was just playing with invisible captcha. I like it but the issue I'm running into is that my system tests (Rails 5.2) fail. I believe its because of the [timestamp feature of the gem](https://github.com/markets/invisible_captcha/blob/master/lib/invisible_captcha.rb). There is a configuration in that file where `time_stamp_enabled = true`. I'm wondering if anyone has tried to access the gem in their testing environment and configure this to be false (or if there are any other methods for getting this to work in a testing environment)? Thanks!

David Kimura PRO said about 6 years ago on Invisible Captcha :
You could set this in your config to something like `Rails.env.development? || Rails.env.production?` or `!Rails.env.test?` to bypass it on the tests.

robertfarese said about 6 years ago on Invisible Captcha :
Thanks Dave! I just added `require 'invisible_captcha'` and `InvisibleCaptcha.time_stamp_enabled = false` in my `spec/rails_helper.rb` and all is good again with the world. Thanks for the quick response!

Login to Comment