diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-05-01 08:32:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-05-01 08:32:21 +0000 |
commit | 1be15816dd30d10339a0dcf2faf44da31fc3e8e5 (patch) | |
tree | b4a2d86d9dc975657695a3681e067675c8223d8a /test/test_helper.rb | |
parent | 80f7faf10aa5a572b25adf2b08a80777472af7b1 (diff) | |
download | redmine-1be15816dd30d10339a0dcf2faf44da31fc3e8e5.tar.gz redmine-1be15816dd30d10339a0dcf2faf44da31fc3e8e5.zip |
Adds test helpers for test repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3720 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 48e2c999a..cb043fa89 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -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 |