Marnen E. Laibow-Koser September 2010, revised June 2012 Why do we need it? Many Web applications call remote services Good testing practice requires us to test these calls How do we test this code? class Twitter include HTTParty def self.user_info(username, format = :json) get "http://api.twitter.com/1/users/show/#{username}.#{format}" end end The obvious approach Call the external service and ma