Displaying 1 result from an estimated 1 matches for "twitteroauth".
Did you mean:
twitterauth
2013 Jan 29
0
How to stub a class inside a module with Mocha in Ruby?
I know there are lot of questions in here around this. I''ve tried all of
them but none of them works. Basically, I''m trying to stub
TwitterOAuth::Client so my test won''t call the real api every time.
Here''s the bit from TwitterOAuth gem that I use.
module TwitterOAuth
class Client
def initialize(options = {})
@consumer_key = options[:consumer_key]
@consumer_secret = options[:consumer_secret]
@to...