Skip to content

Instantly share code, notes, and snippets.

@destroytoday
Created April 2, 2011 22:05
Show Gist options
  • Save destroytoday/899948 to your computer and use it in GitHub Desktop.
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
#!/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