I'm clearly doing something wrong. I'm trying to write and test plain ruby in a single file. I want guard to watch the file and the test file and run minitest any time either file changes.
So, two files: game.rb and game_test.rb
game.rb
class Game
end
game_test.rb
require 'rubygems'
require 'minitest/autorun'
require './game'
class GameTest < MiniTest::Unit::TestCase
def test_truth
assert true
end
end
I also have a Guardfile that looks like this:
notification :terminal_notifier
guard 'minitest', test_folders: '.' do
watch('game.rb')
watch('game_test.rb')
end
Now, I'm probably forgetting something, but I can't for the life of me figure out what it is.
If I start guard and press Enter, "Run All" happens and the tests run.. at least most of the time. However, I have to press Enter for it to happen.
Also, if I make a change to the files nothing happens. I've tried putting gem 'rb-fsevent' in a Gemfile and running with "bundle exec guard" but that doesn't seem to help either.
Any help would be much appreciated. I'm going nuts.
Thanks, Jeremy