Skip to content

Instantly share code, notes, and snippets.

@stretchkennedy
Last active December 7, 2015 00:36
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 stretchkennedy/2a34d65f44c54a474cc9 to your computer and use it in GitHub Desktop.
Save stretchkennedy/2a34d65f44c54a474cc9 to your computer and use it in GitHub Desktop.
Horrible script to find untested routes based on a rails application and a log of tests
comm -23 <(rails r 'Rails.application.routes.routes.map{|r| "#{r.defaults[:controller].try(:camelize)}Controller##{r.defaults[:action]}"}.reject{|s| s == "Controller#"}.each{|s| puts s}' 2> /dev/null | sort | uniq) <(grep 'Processing by' log/test.log | sed 's/Processing by \(.*\) as .*/\1/' | sort | uniq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment