Skip to content

Instantly share code, notes, and snippets.

@RyanScottLewis
Created September 30, 2011 16:00
Show Gist options
  • Select an option

  • Save RyanScottLewis/1254207 to your computer and use it in GitHub Desktop.

Select an option

Save RyanScottLewis/1254207 to your computer and use it in GitHub Desktop.
Finding spec stuff and blah
puts Dir.glob("spec/**/*_spec.rb").inject([]) { |memo, spec_file|
spec_file = Pathname.new(spec_file)
memo << "#{spec_file} is missing the encoding at the top" if spec_file.read !~ /encoding/
memo
}.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment