Looking for help with watch function call in guardphpunit

19 views
Skip to first unread message

Megan O'Sullivan

unread,
Mar 12, 2013, 12:16:22 AM3/12/13
to guar...@googlegroups.com

Simple guard file

guard 'phpunit', :all_on_start => false do
   watch(%r{^tests/+Test\.php$})
end

This runs correctly, but I also want to watch the files in the source code directory which is outside of the directory containing both the Guardfile and the tests directory. Is this possible?

e.g I want to include the line: watch(%r{^../path/to/my/src/(.+)\.php$})

I have tried similar variations of the above but guard php-unit doesn't pick up anything. 

Thanks!

Michael Kessler

unread,
Mar 12, 2013, 2:44:18 AM3/12/13
to guar...@googlegroups.com
You can use the --watchdir option to set a root directory other than the directory where the Guardfile resides. Another option is to symlink that other folder into the project root.
> --
> You received this message because you are subscribed to the Google Groups "guard-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to guard-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Reply all
Reply to author
Forward
0 new messages