KnpLabs/Gaufrette — pull request #146 by TomiS (2013-02-27 10:18:55+00:00)
Title: Refactoring spec tests

Hi again. I started refactoring spec tests and adapters. I'm new to PHPSpec2 so I soon ran into difficulties. Can you @l3l0 maybe help me with following: In GridFS adapter's spec file there's a function ```it_should_write_file``` that causes Mockery exception. I'm not sure why this happens but I think it's because of the dynamically constructed MongoDate object in the actual implementation of the function. Since you obviously have more experience with PHPSpec, can you spot what I'm doing wrong there.

Ps. I was also forced to change specs for File object quite a lot. But that's only because the refactored file object does not know about the filesystem as it did in previous implementation.

Pps. I also made changes to local and ftp specs. You were using ```/home/l3l0``` folder as test folder. I changed ```home``` to ```sys_get_temp_dir()``` and I think it solved some runtime issues for me because the test script was not allowed to create anything in my home folder. I guess using tmp folder would be a bit safer? Or does it really matter?