You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/05/04 22:45:24 UTC

[whimsy] branch master updated: Fix up invalid tests

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 ef996e1  Fix up invalid tests
ef996e1 is described below

commit ef996e1944c3572823b2370846f3d1dad9ee04a7
Author: Sebb <se...@apache.org>
AuthorDate: Mon May 4 23:45:11 2020 +0100

    Fix up invalid tests
---
 lib/spec/lib/icla_spec.rb | 16 +++++++++-------
 lib/test/svn/iclas.txt    |  2 --
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/spec/lib/icla_spec.rb b/lib/spec/lib/icla_spec.rb
index 372f248..6ef2c38 100644
--- a/lib/spec/lib/icla_spec.rb
+++ b/lib/spec/lib/icla_spec.rb
@@ -7,24 +7,26 @@ require 'whimsy/asf'
 set_root # need access to listing file
 
 # Test data:
-# ab/        abc.pdf    abcd/      abcd.pdf   abcde/
+# ab/        abc.pdf     abcd/    abcde/
+# N.B. does not make sense for top-level directory to contain more than 1 entry with same stem;
+# in such cases the files are moved to a subdirectory
 
 describe ASF::ICLAFiles do
   describe "ASF::ICLAFiles.listnames" do
-    it "should return 6 files" do
+    it "should return 4 files" do
       res = ASF::ICLAFiles.listnames
-      expect(res.length).to equal(6)
+      expect(res.length).to equal(4)
     end
   end
 
   describe "ASF::ICLAFiles.matchStem" do
-    it "should return [abcd.pdf] for abcd" do
+    it "should return [] for abcd" do
       res = ASF::ICLAFiles.matchStem('abcd')
-      expect(res).to eq(['abcd.pdf'])
+      expect(res).to eq([])
     end
-    it "should return [abcd.pdf] for abc" do
+    it "should return [abc.pdf] for abc" do
       res = ASF::ICLAFiles.matchStem('abc')
-      expect(res).to eq(['abc.pdf', 'abc.pdf.asc'])
+      expect(res).to eq(['abc.pdf'])
     end
   end
 
diff --git a/lib/test/svn/iclas.txt b/lib/test/svn/iclas.txt
index af1e71b..579bd69 100644
--- a/lib/test/svn/iclas.txt
+++ b/lib/test/svn/iclas.txt
@@ -1,7 +1,5 @@
 0
 ab/
 abc.pdf
-abc.pdf.asc
 abcd/
-abcd.pdf
 abcde/