http://www.perlmonks.org?node_id=931046


in reply to Re: Unit testing OS rich code
in thread Unit testing OS rich code

Eh. I really don't like having filesystem state for tests. I think I'm just avoiding the inevitable here. I've got the same issues coming fast on the horizon for database interactions as well.
Me

Replies are listed 'Best First'.
Re^3: Unit testing OS rich code
by chromatic (Archbishop) on Oct 12, 2011 at 20:20 UTC
    I really don't like having filesystem state for tests.

    If your code manipulates the filesystem, how will you know if it works unless you test that it manipulates the filesystem?


    Improve your skills with Modern Perl: the free book.

      At some point you have to trust that the primitives are doing their job. Otherwise "full code coverage" would always include unit tests that cover perl itself. So keeping an onion-skin layer on top allows me to preserve testability.
      Me