Sha256: e3cf74c06d332080906ccf94ad50ff9e7eaf22bf6d29098a8aa3a4b5793958b5

Contents?: true

Size: 492 Bytes

Versions: 1

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

require 'helper'
require 'peddler/errors/error'

class TestPeddlerErrorsError < MiniTest::Test
  def setup
    @error = Peddler::Errors::Error.new('message', 'cause')
  end

  def test_sets_message
    assert_equal 'message', @error.message
  end

  def test_sets_cause
    assert_equal 'cause', @error.cause
  end

  def test_defines_common_errors
    Peddler::Errors::CODES.each do |name|
      assert ::Peddler::Errors.const_defined?(name)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
peddler-1.6.4 test/unit/peddler/errors/test_error.rb