Created
April 2, 2011 22:05
-
-
Save destroytoday/899948 to your computer and use it in GitHub Desktop.
Prints classes in src folder that don't have an accompanying test file, excluding provided regex args
This file contains hidden or 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
#!/usr/bin/ruby | |
puts "Testless classes in #{Dir.pwd}, excluding #{ARGV.join(', ')}:" | |
Dir.glob("src/**/*.as") do |f| | |
test = f.sub('src', 'test').sub('.as', 'Test.as') | |
exclude = false | |
ARGV.each do |arg| | |
if (test.match(arg)) | |
exclude = true | |
break | |
end | |
end | |
next if exclude | |
puts f unless File.exists? test | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment