Sha256: e4e181425b2d3efb882101c3159def62bd3cb004f8b7e0eb58b51ed8433fab2e

Contents?: true

Size: 537 Bytes

Versions: 4

Compression:

Stored size: 537 Bytes

Contents

require 'spec_helper'

describe Enceladus::Requester do
  # Other requester methods are covered by other tests that fetch TMDb API resources, such as Movies, Cast, Genres, etc.
  describe "response parse error" do
    subject { Enceladus::Requester.get("/movie") }

    before do
      stub_request(:get, /api.themoviedb.org\/movie/).to_return(status: 200, body: "")
    end

    it "should raise error Enceladus::Exception::JsonParseError" do
      expect{ subject }.to raise_error Enceladus::Exception::JsonParseError
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
enceladus-0.0.7 spec/enceladus/requester_spec.rb
enceladus-0.0.6 spec/enceladus/requester_spec.rb
enceladus-0.0.5 spec/enceladus/requester_spec.rb
enceladus-0.0.4 spec/enceladus/requester_spec.rb