Sha256: f1886b8dec8c7e98d75aa53da9b2a384ea657e65ecc1f47a4a409b26cb2dfa00

Contents?: true

Size: 320 Bytes

Versions: 1

Compression:

Stored size: 320 Bytes

Contents

module Mocktail
  class EnsuresImitationSupport
    extend T::Sig

    def ensure(type)
      unless type.is_a?(Class) || type.is_a?(Module)
        raise UnsupportedMocktail.new <<~MSG.tr("\n", " ")
          Mocktail.of() can only mix mocktail instances of modules and classes.
        MSG
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mocktail-2.0.0 lib/mocktail/imitates_type/ensures_imitation_support.rb