require File.dirname(__FILE__) + '/../helper' class BaseTest < Test::Unit::TestCase context "base" do setup do HDCloud::Base.any_instance.stubs(:hd_cloud_stores).returns({:source_id => 3, :destination_id => 4}) @hd = HDCloud::Base.new('foo', 'bar', 1, 2) end context "#stores" do setup do FakeWeb.register_uri(:post, %r|http://foo:bar@hdcloud.com/api/v1/stores|, :body => stores_success, :content_type => 'application/json') end should "submit a get request to stores" do assert_equal "Example Store", @hd.stores.first["store"]["name"] end end end end