Skip to content

Instantly share code, notes, and snippets.

@rubysolo
Created March 27, 2014 20:15
Show Gist options
  • Save rubysolo/9817500 to your computer and use it in GitHub Desktop.
Save rubysolo/9817500 to your computer and use it in GitHub Desktop.
minimum viable rails
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