View Source Patch.Mock.History.Tagged (patch v0.14.0)

Link to this section Summary

Functions

Determine if any of the entries have been tagged in the affirmative

Calculates the count of entries that have been tagged in the affirmative

Returns the first entry that was tagged in the affirmative

Construct a new Tagged History from a History and a Call.

Construct a new Tagged History from a History and a Function Name.

Returns the tag for the given tagged entry

Link to this section Types

Link to this section Functions

@spec any?(tagged :: t()) :: boolean()

Determine if any of the entries have been tagged in the affirmative

@spec count(tagged :: t()) :: non_neg_integer()

Calculates the count of entries that have been tagged in the affirmative

@spec first(tagged :: t()) :: {:ok, Patch.Mock.History.entry()} | false

Returns the first entry that was tagged in the affirmative

Link to this macro

for_call(history, call)

View Source (macro)
@spec for_call(history :: Macro.t(), call :: Macro.t()) :: Macro.t()

Construct a new Tagged History from a History and a Call.

Every entry in the History will be tagged with either true if the entry matches the provided call or false if the entry does not match.

Link to this function

for_function(history, name)

View Source
@spec for_function(
  history :: Patch.Mock.History.t(),
  name :: Patch.Mock.History.name()
) :: t()

Construct a new Tagged History from a History and a Function Name.

Every entry in the History will be tagged with either true if the entry matches the provided Function Name or false if the entry does not match.

@spec tag(entry :: entry()) :: tag()

Returns the tag for the given tagged entry