Created
March 27, 2014 20:15
-
-
Save rubysolo/9817500 to your computer and use it in GitHub Desktop.
minimum viable rails
This file contains hidden or 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
unless defined?(Rails) | |
# minimum viable implementation of Rails | |
class Rails | |
class << self | |
def root | |
Pathname.new(File.expand_path('../..', __FILE__)) | |
end | |
def env | |
'test'.tap do |e| | |
def e.test? | |
true | |
end | |
end | |
end | |
def test? | |
true | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment