Support the ongoing development of Laravel.io →
posted 10 years ago
Testing

I am following along with Jeffery Way's book Laravel Testing Decoded. In chapter 4 he outlines installing guard.

So I did the following ...

sudo gem install guard sudo gem install guard-phpunit sudo gem install terminal-notifier-guard

when I "guard init" ... it generated a Guardfile but then throws the following error ...

ERROR - Could not load 'guard/phpunit' or '~/.guard/templates/phpunit' or find class Guard::Phpunit

How can I fix this? I'm running OS X 10.10.0

Last updated 3 years ago.
0

I just ran into this issue while reading the same book. The fix for me was installing guard-phpunit2 since guard-phpunit is no longer active.

$ gem install guard
$ gem install guard-phpunit2
$ gem install terminal-notifier-guard

And my Guard file looks like this:

guard 'phpunit2', :cli => '--colors', :tests_path => 'app/tests', :command => "./vendor/bin/phpunit" do
  watch(%r{^.+Test\.php$})
end

Hopefully others will find this useful.

Last updated 3 years ago.

enwemasor1995 liked this reply

1

did you find a solution for this problem as I am experiencing the same issues?

Last updated 10 years ago.
0

iovino: Thanks for the solution. Works for me ... except terminal-notifier doesn't seem to work.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

MacWorks macworks Joined 6 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.