diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-06-20 12:33:58 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-06-20 12:33:58 +0000 |
commit | e4d082a421946e64ab5c81d7f48a12db2e8d27f6 (patch) | |
tree | f8dca5b6147992be480344c6d976dc672b6ee0c1 /test/test_helper.rb | |
parent | 2a888e0ea6396de272c2d5873e75a5a7ed78872d (diff) | |
download | redmine-e4d082a421946e64ab5c81d7f48a12db2e8d27f6.tar.gz redmine-e4d082a421946e64ab5c81d7f48a12db2e8d27f6.zip |
replace RAILS_ROOT to Rails.root at test/test_helper.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6103 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 51eaae13e..1bb45bc97 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -106,24 +106,24 @@ class ActiveSupport::TestCase # LDAP is not listening return nil end - + # Returns the path to the test +vendor+ repository def self.repository_path(vendor) - File.join(RAILS_ROOT.gsub(%r{config\/\.\.}, ''), "/tmp/test/#{vendor.downcase}_repository") + Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s end - + # Returns the url of the subversion test repository def self.subversion_repository_url path = repository_path('subversion') path = '/' + path unless path.starts_with?('/') "file://#{path}" end - + # Returns true if the +vendor+ test repository is configured def self.repository_configured?(vendor) File.directory?(repository_path(vendor)) end - + def assert_error_tag(options={}) assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options)) end |