Skip to content

Does not detect changes when I have code and tests in the same directory #148

@ticviking

Description

@ticviking

I am using guard-minitest to practice code katas with what I thought was a pretty simple setup.

the directory looks like

Gemfile
Guardfile
kata.rb
kata_spec.rb

My gemfile is

gem 'minitest'
gem 'minitest-reporters'
gem 'guard'
gem 'guard-minitest'

with the following guardfile

guard :minitest, test_folders:"." do
  watch(%r{(.*)_spec\.rb$})
  watch(%r{(.+)\.rb$}) {|m| "#{m[0]}_spec.rb"}
end

kata_spec.rb looks like this

require 'minitest/autorun'
require 'minitest/reporters'
MiniTest::Reporters.use! Minitest::Reporters::SpecReporter.new
require'./kata'

# Red -> Green -> Refactor

with kata.rb empty.

and the spec runs fine when I first do bundle exec guard but seems to stop execution when I edit any of the files.

I can verify that the files I changes are being detected by guard when I set -d and LISTEN_GEM_DEBUGGING

when I trigger minitest from the guard prompt everything works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions