module Duracloud RSpec.describe Store do let(:url) { "https://example.com/durastore/stores" } let(:body) { <<-EOS 1 AMAZON_GLACIER 2 AMAZON_S3 EOS } before { stub_request(:get, url).to_return(body: body) } describe ".all" do subject { Store.all } specify { expect(subject.map(&:provider_type)).to contain_exactly("AMAZON_GLACIER", "AMAZON_S3") } end describe ".primary" do subject { Store.primary } specify { expect(subject.id).to eq("2") } end end end