##// END OF EJS Templates
replace RAILS_ROOT to Rails.root at test/test_helper.rb....
Toshi MARUYAMA -
r5983:e4d082a42194
parent child
Show More
@@ -106,24 +106,24 class ActiveSupport::TestCase
106 # LDAP is not listening
106 # LDAP is not listening
107 return nil
107 return nil
108 end
108 end
109
109
110 # Returns the path to the test +vendor+ repository
110 # Returns the path to the test +vendor+ repository
111 def self.repository_path(vendor)
111 def self.repository_path(vendor)
112 File.join(RAILS_ROOT.gsub(%r{config\/\.\.}, ''), "/tmp/test/#{vendor.downcase}_repository")
112 Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s
113 end
113 end
114
114
115 # Returns the url of the subversion test repository
115 # Returns the url of the subversion test repository
116 def self.subversion_repository_url
116 def self.subversion_repository_url
117 path = repository_path('subversion')
117 path = repository_path('subversion')
118 path = '/' + path unless path.starts_with?('/')
118 path = '/' + path unless path.starts_with?('/')
119 "file://#{path}"
119 "file://#{path}"
120 end
120 end
121
121
122 # Returns true if the +vendor+ test repository is configured
122 # Returns true if the +vendor+ test repository is configured
123 def self.repository_configured?(vendor)
123 def self.repository_configured?(vendor)
124 File.directory?(repository_path(vendor))
124 File.directory?(repository_path(vendor))
125 end
125 end
126
126
127 def assert_error_tag(options={})
127 def assert_error_tag(options={})
128 assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options))
128 assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options))
129 end
129 end
General Comments 0
You need to be logged in to leave comments. Login now