guard/guard — Issue #249: Example for programmatic use doesn't work
Author: oreoshake
Created: 2012-03-01 22:49:03+00:00
State: open

require 'guard'

Guard.setup

guardfile = <<-EOF
guard 'rspec' do
watch(%r{^spec/.+_spec\.rb$})
end
EOF

Guard::Dsl.evaluate_guardfile(:guardfile_contents => guardfile)
Guard.start

Output:

Using inline Guardfile.
ERROR: No Guardfile found, please create one with `guard init`.