Getting CIUnit To Work With Sparks
02 Mar 2012I recently got bit by the Sparks bug again. If you don’t know, Sparks is like CodeIgniter’s version of Ruby Gems. It’s a command-line-based package manager that lets you install stuff for CodeIgniter quickly and keep it up-to-date. It’s a great idea and I want to port my libraries over to this system.
So I thought I’d try to get Kenji’s CIUnit working with Sparks. His wiki says to just change one line in MY_Loader.php
(which is created by Sparks) and you’re good to go. I found this to not be the case, so I did a little digging. Here’s what you need to do to get them to play nice together.
If you haven’t already, start by installing Sparks.
In application/core/MY_Loader.php
change this:
to this:
Then in application/third_party/CIUnit/core/CIU_Loader.php change this:
to this:
Then you should be good to go. CD back to your root/tests in the terminal and hit phpunit. If you’ve loaded sparks, they should now work without erroring out. Huzzah!