Debian Codegraph @

Changes

raw
1 Revision history for Mock-Sub
2
3 1.09 2017-12-28
4 - setting a return_value or side_effect when mocking one sub doesn't
5 affect any other subs mocked (fixes #25)
6 - params passed into a mocked sub will only be returned if
7 return_value is set to "params" (closes #26)
8
9 1.08 2017-12-21
10 - the mocked subs now return the parameters that were sent in to it if
11 return_value or side_effect have not been set (closes #24)
12
13 1.07 2016-10-05
14 - POD fix (closes #20)
15 - changed croak() to confess()
16 - you can now add "no_warnings => 1" to the 'use Mock::Sub' line to
17 disable warnings about mocking non-existent subs (closes #22)
18
19 1.06 2016-01-23
20 - new remock() method does what Child::mock() used to do.
21 - Child::mock() renamed to Child::_mock(), and is now private
22 (fixes #17)
23 - more documentation cleanup
24
25 1.05 2016-01-22
26 - added tests for mocked_objects()
27 - Child.pm now has basic pod (mostly to satisfy pod tests) (closes #15)
28 - added .list to MANIFEST.SKIP to ignore RHEL vendor specific build
29 files (reported by Denis Fateyev) (also #15)
30 - this was previously fixed (closes #13)
31
32 1.04 2016-01-08
33 - MANIFEST updates
34
35 1.03 2015-12-10
36 - completely reworked distribution into two modules (parent and Child)
37 - we now have the ability to mock out CORE::GLOBAL functions
38 (eg: caller()). You MUST do the mock within a BEGIN block
39
40 1.02 2015-12-09
41 - fixed bug where if the mocked sub isn't called, the original sub
42 wasn't being restored
43 - called_count() now returns 0 instead of undef if there isn't a count
44 - fix issue #11: called_count wasn't being reset to 0 after reset()
45 - side_effect param can now be sent into new() which will be retained
46 in all child objects created by mock()
47 - return_value param can be send into new(), passed into all child
48 objects
49 - added mocked_objects(), returns a list of objects that have mocked
50 subs (if unmocked(), obj won't be returned)
51 - added mocked_names(), same as mocked_objects() but returns the sub
52 names only
53 - mocked_state(), returns bool whether the named sub is currently
54 mocked
55
56 1.01 2015-12-08
57 - DESTROY() always calls unmock() now. The option to disable this has
58 been removed
59
60 0.11 2015-12-08
61 - if mock() is called in void context, we'll croak (except in the
62 instance where you're re-mocking an unmock()ed sub with the same
63 object)
64 - fixes bug where DESTROY() wasn't able to properly clean up prior
65 to END
66
67 0.10 2015-12-07
68 - all bugs fixed in this release reported by Joel Berger (jberger)
69 - fix issue #5: we now pass in any parameters passed to the mocked
70 function into the side_effect cref
71 - fix issue #6: return_value() now accepts lists (however, using the
72 param version of return_value, only a scalar is accepted).
73 - fix issue #8: called_with() now die()s if it's called before the
74 mocked sub has been
75 - fix issue #7: mocked sub (and the object) is now much more context
76 aware
77 - fix issue #9: DESTROY() now unmock()s by default
78 (keep_mock_on_destroy param to override)
79
80 0.09 2015-12-01
81 - mocking a non-existent sub is now allowed, and spits out a warning
82 message
83 - unmock() removes the symtab entry if mock() created a fake
84 (non-existent) sub entry in the symbol table
85 - added side_effect() and return_value()
86
87 0.08 2015-11-30
88 - fixes bug #3: add eval() in side_effect in SYNOPSIS
89 - fixes bug #2: having side_effect after return_value breaks t/06
90 - fixes bug #1: add called_with(), to extract the args passed in to
91 the mocked sub
92 - fixes bug #4: completely validate that the sub param is a valid sub
93 - 'main::' is now prepended to subs if they don't have a package
94 - side_effect now properly returns last expression evaluated
95 - side_effect and return_value can now be sent in simultaneously
96
97 0.07 2015-11-29
98 - code cleanup
99 - pod updates
100 - opened bug 1: need to add with_args()
101
102 0.04 2015-11-29
103 - added name()
104 - many more tests
105 - major POD updates/fixes
106
107 0.02 2015-11-29
108 - renamed project from Test::MockSub to Mock::Sub
109 - added numerous test files
110 - added initial POD
111
112 0.01 2015-11-29
113 - initial import
114