Sha256: 1684476eaf1021fbf77b36e0cffe585ac745a0d53e2778f247864525fb9c6a53

Contents?: true

Size: 414 Bytes

Versions: 6

Compression:

Stored size: 414 Bytes

Contents

shared_examples 'a base ChartMogul API V1 requests' do |method: :get|

  it { expect(subject).to be_a Chartmogul::V1::Request }
  it { expect(subject.ok?).to be_truthy }

  context '400 response code on request' do
    before do
      stub_request(method, url).with(query: query).to_return(status: 400)
    end

    it { expect { subject }.to_not raise_error }
    it { expect(subject.ok?).to be_falsy }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chartmogul_client-0.0.6 spec/support/shared_examples/chartmogul_api_v1_examples.rb
chartmogul_client-0.0.5 spec/support/shared_examples/chartmogul_api_v1_examples.rb
chartmogul_client-0.0.4 spec/support/shared_examples/chartmogul_api_v1_examples.rb
chartmogul_client-0.0.3 spec/support/shared_examples/chartmogul_api_v1_examples.rb
chartmogul_client-0.0.2 spec/support/shared_examples/chartmogul_api_v1_examples.rb
chartmogul_client-0.0.1 spec/support/shared_examples/chartmogul_api_v1_examples.rb