Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Can Test::MockObject mock a file?

by perlfan (Vicar)
on Sep 19, 2020 at 23:37 UTC ( #11121953=note: print w/replies, xml ) Need Help??


in reply to Can Test::MockObject mock a file?

Test::MockFile::FileHandle exists. Also, file handles can be "mocked" using tie and implementing a null file handle interface, if one doesn't exist. See perltie on this. File::Temp is also used extensively in testing scenarios, as mentioned already.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121953]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-10-24 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?