Created
March 6, 2019 11:38
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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