spec/routemaster/resources/rest_resource_spec.rb in routemaster-drain-2.5.4 vs spec/routemaster/resources/rest_resource_spec.rb in routemaster-drain-3.0.0

- old
+ new

@@ -5,12 +5,10 @@ module Resources RSpec.describe RestResource do let(:client) { double('Client') } let(:params) { {} } - before { allow(client).to receive(:with_response).and_yield } - describe "singular resource" do let(:url) { '/resources/1' } subject { described_class.new('/resources/{id}', client: client) } @@ -48,10 +46,14 @@ end end describe '#index' do it 'gets to the given url' do - expect(client).to receive(:get).with(url, params: {}, options: { enable_caching: false }) + expect(client).to receive(:get).with( + url, params: {}, options: { + enable_caching: false, response_class: Routemaster::Responses::HateoasEnumerableResponse + } + ) subject.index end end end end