Skip to content

Instantly share code, notes, and snippets.

@jens
Forked from henrik/find_closest_spec_helper.rb
Created April 8, 2010 13:25
Show Gist options
  • Save jens/360067 to your computer and use it in GitHub Desktop.
Save jens/360067 to your computer and use it in GitHub Desktop.
current_path = File.expand_path(File.dirname(__FILE__))
require File.join(current_path.split("/").collect {|p| current_path.split("/" + p).first + "/" + p}.reverse.detect {|p| File.exist?(p + "/spec_helper.rb")}, 'spec_helper')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment