whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Allow local rspec test usage
Date Mon, 27 May 2019 19:57:38 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 833e552  Allow local rspec test usage
833e552 is described below

commit 833e552541a49d37845c4cccbc9d5ac40c0bbcce
Author: Sebb <sebb@apache.org>
AuthorDate: Mon May 27 20:57:35 2019 +0100

    Allow local rspec test usage
---
 lib/spec/spec_helper.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/spec/spec_helper.rb b/lib/spec/spec_helper.rb
index f90936a..0996a03 100644
--- a/lib/spec/spec_helper.rb
+++ b/lib/spec/spec_helper.rb
@@ -1,7 +1,10 @@
 $LOAD_PATH.unshift '/srv/whimsy/lib'
 
 require 'whimsy/asf'
-ASF::SVN['apmail_bin'] = File.expand_path('../test/svn/apmail_bin', __dir__)
+# Override with test data if there is no checkout available (allows local use)
+unless ASF::SVN.find('apmail_bin')
+  ASF::SVN['apmail_bin'] = File.expand_path('../test/svn/apmail_bin', __dir__)
+end
 
 unless defined?(SPEC_ROOT)
   SPEC_ROOT = File.join(File.dirname(__FILE__))


Mime
View raw message