Sha256: c761191f748a1ee62723731c0cfcc4d08aac3731f34badfa74368cf328e0e7dd
Contents?: true
Size: 802 Bytes
Versions: 2
Compression:
Stored size: 802 Bytes
Contents
require File.expand_path('../../spec_helper', __FILE__) describe Faraday::Response do before do @client = Genability::Client.new({:application_id => 'ValidAppID', :application_key => 'ValidAppKey'}) end { 400 => Genability::BadRequest, 403 => Genability::Forbidden, 404 => Genability::NotFound, 500 => Genability::ServerError, 503 => Genability::ServiceUnavailable }.each do |status, exception| context "when HTTP status is #{status}" do before(:each) do stub_get('public/lses?appId=ValidAppID&appKey=ValidAppKey'). to_return(:status => status) end it "should raise #{exception.name} error" do lambda do @client.load_serving_entities() end.should raise_error(exception) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
genability-0.3.0 | spec/faraday/response_spec.rb |
genability-0.2.0 | spec/faraday/response_spec.rb |