Adds test helpers for test repositories.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3720 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-05-01 08:32:21 +00:00
parent 80f7faf10a
commit 1be15816dd
4 changed files with 15 additions and 13 deletions
+10
View File
@@ -83,6 +83,16 @@ 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")
end
# Returns true if the +vendor+ test repository is configured
def self.repository_configured?(vendor)
File.directory?(repository_path(vendor))
end
# Shoulda macros
def self.should_render_404