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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user