Skip to content

Deprecate history and provide history digging functions instead  #85

Closed

Description

@horkhe

Test writers do not need entire history. They need a convenient way to find out some specific facts about the history like called and num_calls functions. By providing them entire history we kind of forcing them to write custom information retrieval and verification functions.

I believe a better way would be to provide a comprehancive set of history digging functions, such as:

  • verify - a unified version of called and num_calls that allows complex number of calls verification, argument matching using standard Erlang patterns and possibly Hamcrest matchers. It will also support verification of the order in which functions were called;
  • capture - provides a way to retrieve a particular argument value that a particular function was called with.

That probably covers everything a testing human being might need.

Activity

  1. eproxus commented on Oct 28, 2012

    @eproxus
    Owner

    +1

    Although history/1 should probably be left since people might want to build their own hacks on top of it (but with the documented caveat that the return format might change in future versions).

  2. horkhe commented on Oct 28, 2012

    @horkhe
    ContributorAuthor

    We won't delete it, we will just deprecate it.

  3. eproxus commented on Oct 28, 2012

    @eproxus
    Owner

    I would like it to stay as not deprecated, perhaps hidden or just "marked" as non-reliable (between versions).

  4. modified the milestones: 1.0, on Nov 21, 2016
  5. eproxus commented on Nov 21, 2016

    @eproxus
    Owner

    Closing and documenting in the wiki instead: https://github.com/eproxus/meck/wiki#feature-ideas

    Please comment here if you have information or requests to add, and/or want to discuss a PR or possible implementation proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions