Sha256: 39ebe0228e6f9f19a53e8baadc9afbfc0fcfc6aa04107e2decbe5d2c362bf8a6
Contents?: true
Size: 452 Bytes
Versions: 4
Compression:
Stored size: 452 Bytes
Contents
# frozen_string_literal: true require "test_helper" class ErrorsTest < Minitest::Test Aitch::Response::ERRORS.each do |code, exception| name = Aitch::Utils.underscore(exception.name.split("::").last).gsub("_error", "") test "detects response as #{name}" do config = {} http_response = stub(code: code) response = Aitch::Response.new(config, http_response) assert response.public_send("#{name}?") end end end
Version data entries
4 entries across 4 versions & 1 rubygems