From 302ed0f642c755b6f96def25eda25e2d2dae8891 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 19 Oct 2017 15:27:30 +0200 Subject: Refs: #4633@3h: - Discussing Spec - Speced and implemented the corrupt zipfile part Next: - Spec incorrect directory structure part - Implement incorrect directory structure part --- spec/support/random.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/support/random.rb') diff --git a/spec/support/random.rb b/spec/support/random.rb index 59e1a1475..1d5d62ec8 100644 --- a/spec/support/random.rb +++ b/spec/support/random.rb @@ -22,6 +22,12 @@ module Support def random_string SecureRandom.urlsafe_base64 end + + def very_random(veryness=3, joiner: '-') + raise ArgumentError, 'not very random' unless veryness > 1 + 3.times.map{ SecureRandom.uuid }.join(joiner) + end + end end -- cgit v1.2.3 From d351eab8ceea2bc7609e800e62bfb90c000cff5c Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 19 Oct 2017 20:45:50 +0200 Subject: Refs: #4633@0.5h; WorkbenchImportWorker implements message creation for spurious directories - Speced and implemented Missing: - Exact message parameters (change key from xxx, how to add names of spurious directories) --- spec/support/random.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/support/random.rb') diff --git a/spec/support/random.rb b/spec/support/random.rb index 1d5d62ec8..0ebc2ee5e 100644 --- a/spec/support/random.rb +++ b/spec/support/random.rb @@ -25,7 +25,7 @@ module Support def very_random(veryness=3, joiner: '-') raise ArgumentError, 'not very random' unless veryness > 1 - 3.times.map{ SecureRandom.uuid }.join(joiner) + veryness.times.map{ SecureRandom.uuid }.join(joiner) end end -- cgit v1.2.3