spec/concerns/crud_programs_spec.rb in mrkt-1.2.0 vs spec/concerns/crud_programs_spec.rb in mrkt-1.2.1

- old
+ new

@@ -1,9 +1,11 @@ describe Mrkt::CrudPrograms do - include_context 'initialized client' + include_context 'with an initialized client' describe '#browse_programs' do + subject { client.browse_programs } + let(:response_stub) do { success: true, warnings: [], errors: [], @@ -28,21 +30,21 @@ } ] } end - subject { client.browse_programs } - before do stub_request(:get, "https://#{host}/rest/asset/v1/programs.json") .to_return(json_stub(response_stub)) end it { is_expected.to eq(response_stub) } end describe '#get_program_by_id' do + subject { client.get_program_by_id(1107) } + let(:response_stub) do { success: true, warnings: [], errors: [], @@ -73,11 +75,9 @@ costs: nil } ] } end - - subject { client.get_program_by_id(1107) } before do stub_request(:get, "https://#{host}/rest/asset/v1/program/1107.json") .to_return(json_stub(response_stub)) end