I have a rails application that I just threw guard and minitest and my gaurd file is
guard 'minitest', :cli => '--drb --format doc --color' do
# with Minitest::Unit
watch(%r|^test/(.*)\/?test_(.*)\.rb|)
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r|^test/test_helper\.rb|) { "test" }
# Rails
watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/functional/#{m[1]}_test.rb" }
watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
end
but when i run guard i get a command prompt
bundle exec guard
22:14:12 - INFO - Guard uses TerminalTitle to send notifications.
22:14:12 - INFO - Guard is now watching at '/Users/trace/Sites/application'
1.9.3 (main):0 > 2 + 2
=> 4
Why am i getting this prompt. Any ideas... here are some of the gems i am using
UPDATE...
when i run all minitest
then the tests run...but why do i have to run that...any ideas
What your seeing is the Guard interactor, which makes use of Pry. Normally the prompt looks a bit different, so I assume you've a
~/.pryrc
file with some configuration. With Guard 1.5.3, released yesterday, Guard ignores~/.pryrc
and only evaluates~/.guardrc
for the Pry configuration, so the normal Pry configuration is separated from the Guard Pry interactor.When you're seeing this prompt, it means that Guard is waiting and has nothing to do. You can now start working and Guard automatically starts testing your app with minitest according to your file modifications and watcher configuration, or you can manually trigger an action.
You can get a list of the available actions with
help guard
. Some commands are generated depending on your Guard plugins and groups within yourGuardfile
. Here's an example of one of my projects: