Skip to content

Instantly share code, notes, and snippets.

@nyarly
Created June 23, 2014 18:19
Show Gist options
  • Save nyarly/78a304b9e6ae4fe34747 to your computer and use it in GitHub Desktop.
Save nyarly/78a304b9e6ae4fe34747 to your computer and use it in GitHub Desktop.
require 'spec_helper'
require 'find'
%w{lib app}.each do |subdir|
path = Rails.root.join(subdir)
puts "Requiring files under #{path}"
Find.find(path) do |path|
if File.file?(path) and %r{.*\.rb\z} =~ path
begin
require path
rescue => ex
warn "Exception #{ex.inspect} while requiring #{path}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment