Sha256: b818a3d0147526fa59ac1715c371eaf349f1ce8774f8312927e41b507f46ff18
Contents?: true
Size: 489 Bytes
Versions: 7
Compression:
Stored size: 489 Bytes
Contents
require File.join File.dirname(__FILE__), 'env.rb' describe Geoloqi::ApiError do it 'throws exception properly and allows drill-down of message' do error = Geoloqi::ApiError.new 405, 'not_enough_cats', 'not enough cats to complete this request' expect { error.status == 405 } expect { error.type == 'not_enough_cats' } expect { error.reason == 'not enough cats to complete this request' } expect { error.message == "#{error.type} - #{error.reason} (405)" } end end
Version data entries
7 entries across 7 versions & 1 rubygems