stub helper for avoid twitter request

5 views
Skip to first unread message

rdavila

unread,
Nov 27, 2009, 8:49:27 PM11/27/09
to shoulda
Hi folks, I'm using the twitter gem for get my last tweets and I've a
recent_tweets helper in my application_helper, this helper is used in
layout level, then I want to stub this helper and avoid the twitter
request because my tests are very slow, how to I can stub this helper
for all my functional tests?

Thanks.

Michael Breen

unread,
Nov 28, 2009, 9:05:59 AM11/28/09
to sho...@googlegroups.com
You may want to think about stubbing the HTTP request to Twitter using webmock[1] or fakeweb[2] instead of stubbing your helper.

Best,
Mike

[1] http://github.com/bblimke/webmock
[2] http://github.com/chrisk/fakeweb/
> --
> Individuals over processes. Interactions over tools.
>
> Agile Rails training from thoughtbot, the makers of Clearance, Shoulda, & Factory Girl:
> http://thoughtbot.com/services/training
>
> The Shoulda group:
> http://groups.google.com/group/shoulda
>
> To post to this group, send email to
> sho...@googlegroups.com
>
> To unsubscribe from this group, send email to
> shoulda+u...@googlegroups.com

rdavila

unread,
Nov 28, 2009, 8:02:53 PM11/28/09
to shoulda
Very thanks Michael, Fakeweb saves the day!
Reply all
Reply to author
Forward
0 new messages