Sha256: 8c88b1847f164d784aec5f063bed7571659ede81e2aa4bc6e0f74aadca2209ac

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

require 'spec_helper'

describe Faraday::Response do
  before do
    @client = Instapaper::Client.new
  end

  [1040, 1041, 1042, 1220, 1221, 1240, 1241, 1242, 1243, 1244, 1245, 1250,
    1251, 1252, 1500, 1550].each do |status|
    context "when HTTP status is #{status}" do
      before do
        stub_post('folders/list').to_return(:status => status)
      end

      it "should raise Instapaper::Error error" do
        lambda do
          @client.folders
        end.should raise_error(Instapaper::Error)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
instapaper-0.3.0 spec/faraday/response_spec.rb
instapaper-0.2.1 spec/faraday/response_spec.rb
instapaper-0.2.0 spec/faraday/response_spec.rb