Sha256: 09dccb075e08bdc71f3a17748b53efbae81fb276da50423cc98536aa9708d0fe
Contents?: true
Size: 742 Bytes
Versions: 1
Compression:
Stored size: 742 Bytes
Contents
require File.expand_path('../../../test_helper', __FILE__) module Etsy class BasicClientTest < Test::Unit::TestCase context "An instance of the BasicClient class" do should "be able to construct a client" do Etsy.stubs(:host).returns 'example.com' client = BasicClient.new Net::HTTP.stubs(:new).with('example.com').returns('client') client.client.should == 'client' end should "be able to perform a GET request" do http_client = stub() http_client.stubs(:get).with('endpoint').returns('response') client = BasicClient.new client.stubs(:client).returns(http_client) client.get('endpoint').should == 'response' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
etsy-0.2.2 | test/unit/etsy/basic_client_test.rb |