-
-
Save aalin/360038 to your computer and use it in GitHub Desktop.
This file contains 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
def find_spec_helper(path) | |
spec_helper = File.join(path, 'spec_helper.rb') | |
if File.exists?(spec_helper) | |
spec_helper | |
elsif path == "/" | |
raise "No spec helper found" | |
else | |
find_spec_helper(File.dirname(path)) | |
end | |
end | |
root = '/Users/henrik/Sites/auktion/spec/models/auction' | |
puts find_spec_helper(root) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment