hadley/testthat — pull request #169 by krlmlr (2014-09-18 20:40:40+00:00)
Title: exported functions are also mocked in the package environment

- as returned by as.environment("package:")
- only if the package is loaded
- this applies to both qualified and unqualified mocks (i.e., `with_mock(acf = stop, "stats")` and ```with_mock(`stats::acf` = stop)``` both mock the `acf` function correctly)
- support new syntax ```with_mock(`stats:::add1.default` = identity)```, but internally no distinciton is made between two and three columns
- tests

Fixes #168.