Skip to content

Instantly share code, notes, and snippets.

@boddhisattva
Created March 6, 2019 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boddhisattva/b67e8d1cf67e52b5e2da9757e22d6360 to your computer and use it in GitHub Desktop.
Save boddhisattva/b67e8d1cf67e52b5e2da9757e22d6360 to your computer and use it in GitHub Desktop.
Guardfile code for running the exercise related tests in Exercism's Ruby Track
guard :minitest, test_folders: '.' do
watch(%r{^(.*/)?([^/]+)\.rb$}) do |match_data|
test_file = if match_data[2].include? "test"
match_data[2].split('_').first
else
match_data[2]
end
"./#{test_file}_test.rb"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment