CodeIgniter Forums
can't make CIUnit and active record to work together. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: can't make CIUnit and active record to work together. (/showthread.php?tid=47013)



can't make CIUnit and active record to work together. - El Forum - 11-23-2011

[eluser]Unknown[/eluser]
Hi, i am new to unit testing and codeigniter, so i may be doing something very wrong, but it is already a second day in frustration to make CIUnit and Active Record work together, so i need help.

I am using this https://bitbucket.org/kenjis/my-ciunit
for testing, running tests trough terminal and it is doing fine as long as i use regular Codeigniter Models.

However, the troubles starts when i create an active record model and try to load it in my unit tests like so:

Code:
$this->CI->load->model('User');

I recieve "Class 'ActiveRecord\Model' not found" (Model class extends ActiveRecord\Model), so i suppose it is some kind of loading problem.

It would be great if someone have done something similar and can help me.

Thanks