Skip to content
This repository has been archived by the owner on Dec 5, 2017. It is now read-only.

Commit

Permalink
Mock Rails.root
Browse files Browse the repository at this point in the history
  • Loading branch information
norman committed Feb 16, 2012
1 parent 5a1dcba commit 019dfbb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
require "active_record"
require "logger"
require "rack/test"
require "pathname"

$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
require "has_image"

RAILS_ROOT = File.join(File.dirname(__FILE__), '..', 'tmp')
module Rails
extend self
def root
Pathname(File.join(File.dirname(__FILE__), '..', 'tmp'))
end
end

ActiveRecord::Base.logger = Logger.new($stdout) if ENV["LOG"]
ActiveRecord::Migration.verbose = false
Expand Down

0 comments on commit 019dfbb

Please sign in to comment.