protection agains incorrect usage

Issue #5 resolved
Carlos Ble repo owner created an issue

spy = empty_spy() assert_that_was_called( # should be with_args

It is OK because any unexistent method works quietly, and that is dangerous.

Comments (3)

  1. David Villa Alises

    Hi Carlos:

    The doublex wrapper for pyDoubles defines assert_that_method_called as a normal class (assert_that_was_called() is just a trivial factory). It does not create methods automatically, so this behaviour can not happen. If you try the code above you will get:

    AttibuteError: 'assert_that_method' object has no attribute 'with_params'

    Next pyDoubles release will fix[1]


  2. Log in to comment