Sha256: 48ec458566637a941988f535eb95e0a9e16c0743086cdeaab32a97d822d45db8
Contents?: true
Size: 425 Bytes
Versions: 8
Compression:
Stored size: 425 Bytes
Contents
require 'spec_helper' describe Aptible::Resource::Base do it 'throws errors with a useful message' do href = 'https://resource.example.com/mainframes/1' body = { 'error' => 'unprocessable_entity', message: 'This is all wrong' } stub_request(:get, href).to_return(body: JSON.unparse(body), status: 422) expect { Api::Mainframe.find(1) } .to raise_error(/unprocessable_entity.*all wrong/im) end end
Version data entries
8 entries across 8 versions & 1 rubygems