I've been having some problems with a "provided" statement and I was wondering if anyone could help? What I want to do is make sure that two values in the called parameters match each other. They will vary from run to run as they're a generated UUID in a string, but they should always be the same in a single run. Relatedly, I'd love to be able to write something where I could retrieve the values from one "provided" function and make sure they match the internal values used at a later call. Was considering something really crufty with atoms, but hope there's a better way.
I tried just writing it out (full version at the bottom of the email), and it didn't work, so I've got a simplified form here that also doesn't work and wanted to check if I'm doing something really stupid...
The provided statement is:
(provided
(#'clj-leveldb/put anything :conventions ..uuid..)=> nil)
and I get the following errors
FAIL at (handler_tests.clj:33)
You never said #'put would be called with these arguments:
[nil :conventions ["d0d98d3c-93c1-4a58-b9cf-5b94df02af2a"]]
FAIL at (handler_tests.clj:33)
These calls were not made the right number of times:
((var clj-leveldb/put) anything :conventions ..uuid..) [expected at least once, actually never called]
I've tried replacing "..uuid.." with "[..uuid..]", same result.
FYI, the statement I was trying for at the end is the following
(provided
(#'clj-leveldb/put anything :conventions [..uuid..] ..uuid.. {:name "stuff" :from "dd" :to "blah"})=> nil)
Thanks muchly,
Tom Parker