I'm using guard-minitest to automatically run my tests.
I also have a skeleton gem inside the test/fixtures
directory.
The problem is, now Guard is running the tests in the skeleton gem also.
How can I tell Guard to only run my tests for my actual project and not any projects in the test/fixtures
directory?
I've tried the following, but it isn't working:
guard :minitest, :exclude => "test/fixtures/*" 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' }
end
Edit:
The docs make it seem like I can add an ignore path, this also didn't work:
ignore %r{^test/fixtures/}
guard :minitest do
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r{^test/test_helper\.rb$}) { 'test' }
end
Edit:
As recommended below I tried removing the asterisk, also doesn't work:
ignore %r{^test/fixtures/}
guard :minitest do
watch(%r{^test/test_(.*)\.rb$})
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
watch(%r{^test/test_helper\.rb$}) { 'test' }
end
Make a more specific directory, add a more specific watcher regular expression, and add a
test_folders:
options docsThis is my working guard file and test dir:
dir structure: