Sha256: 6640409bf3b8072c99d9b2781018b2631c232ebb5f53e84a47568ab2e5f03180

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hdcloud-0.1.0 test/hdcloud/stores_test.rb