AW1
October 11, 2013, 9:35pm
1
I was finally able to get mxunit and mocking working on my local Windows install but after the sys admin installed it on our Linux server I get the following error only when I use it. It works fine for another app that does not require mocking.
Offending code:
mockLogger = getMockBox().createMock(‘coldbox.system.logging.Logger’);
mockLogger.$(“info”).$(“debug”).$(“warn”).$(“error”);
model.$property(propertyName=“logger”, mock=mockLogger);
Error:
…/shared/coldbox/system/testing/stubs/9DA00BFE-CBB2-164D-DAB9269585B3E317.cfm (Permission denied)
Is there a something that I should be setting in my test/Application.cfc?
Thanks,
Aaron
The /coldbox/system/testing/stubs directory needs write permissions in order to work for stub creation.
Or you can pass a ram:// generationPath argument to getMockBox() so it does it in RAM>
Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com
Social: twitter.com/lmajano facebook.com/lmajano
AW1
October 11, 2013, 10:48pm
3
Thanks for the quick response.
I couldn’t get the ram:// to work but I was able to get the following to work.
mockLogger = getMockBox().init( generationPath=“applicationPath/test/unit/tmp” ).createMock(‘coldbox.system.logging.Logger’);
and then granted appropriate permissions from there.
Thanks,
Aaron