Stubbing CAPTCHA to pass Cucumber scenario

I’m trying to start using cucumber. I’ve done login, logout scenarious,
but stumbled in CAPTCHA validation on user registration page. As I get I
should stub CAPTCHA validation method. I guess I should implement
stubbing Given step or include stubbing code in Before filter?

I use validates_captcha gem, thus instance method to stub is

module ValidatesCaptcha
module ModelValidation
module InstanceMethods
def validate_captcha
# doing nothing means passing

I’ve read these posts
but still don’t get where should I put stubbing code, should I call
stub! method and if so, of which object?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs