Permalink
Browse files

changed RAILS_ROOT to Rails.root to fix deprecation warnings

  • Loading branch information...
1 parent 34253e0 commit a5d56e1093f7df0919e3c2606cb4331681c2e0be @pelargir committed Jul 14, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/lindo.rb
  2. +1 −1 test/lindo/browser_test.rb
View
@@ -2,7 +2,7 @@
require 'lindo/browser'
module Lindo
- TMP = File.join(RAILS_ROOT, "tmp", "lindo")
+ TMP = File.join(Rails.root, "tmp", "lindo")
RESPONSE_TXT = File.join(TMP, "response.txt")
RESPONSE_HTML = File.join(TMP, "response.html")
ASSETS = %w(images stylesheets javascripts)
@@ -27,7 +27,7 @@ def create_tmp_dir
def copy_assets
ASSETS.each do |e|
- dir = File.join(RAILS_ROOT, "public", e)
+ dir = File.join(Rails.root, "public", e)
FileUtils.cp_r(dir, TMP) if File.exists?(dir)
end
end
@@ -2,7 +2,7 @@
require 'rubygems'
require 'mocha'
-RAILS_ROOT = '.'
+Rails.root = '.'
require 'lindo'
class BrowserTest < Test::Unit::TestCase

0 comments on commit a5d56e1

Please sign in to comment.