CodeIgniter Forums
How to make PHPSpec work with CodeIgniter 2? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forum-7.html)
+--- Forum: Addins (https://forum.codeigniter.com/forum-13.html)
+--- Thread: How to make PHPSpec work with CodeIgniter 2? (/thread-1434.html)



How to make PHPSpec work with CodeIgniter 2? - elmitxel - 03-10-2015

I'm trying to make PHPSpec work with our CodeIgniter code, but I'm not being lucky.
I installed PhpSpec with Composer like this:

Code:
{
  "require": {
    "phpspec/phpspec": "~2.0"
  },
  "config": {
    "bin-dir": "bin"
  },
  "autoload": {
    "psr-4": { "phpspec\\": "" }
  }
}

and my PHPSpec configuration is:

Code:
suites:
    phpspec_suite:
        namespace: phpspec
        psr4_prefix: phpspec
        src_path: .

I'm making it run with:

Code:
bin/phpspec desc "phpspec\application\controllers\hello"

Any ideas on what am I doing wrong? Has someone used PHPSpec2 within CodeIgniter2? I've seen examples of using PHPSpec with Symfony, but I've found nothing on CodeIgniter...
Please, any help will be welcome!!