Hi,
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
      private
      def validate_captcha
        # doing nothing means passing
      end
    end
  end
end

I've read these posts
http://vinsol.com/blog/2006/07/21/rails-captcha-and-testing-using-mock-objects/
http://www.brynary.com/2009/2/3/cucumber-step-definition-tip-stubbing-time
but still don't get where should I put stubbing code, should I call
stub! method and if so, of which object?
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to