Permalink
Browse files

Adding dumping to disk

  • Loading branch information...
1 parent 05d39c2 commit 4a383d026d856cfccaa07d12d10ee6b8ecfa6c49 @ifesdjeen committed Oct 31, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −2 src/vcr_clj/recorder.clj
  2. +0 −2 test/vcr_clj/recorder_test.clj
View
7 src/vcr_clj/recorder.clj
@@ -27,8 +27,11 @@
(get-all
[_]
- store-map))
+ store-map)
+
+ (dump-tp-disk! [_ options]
+ (some #(= options %) (keys @store-map))))
(defn vcr-memory-store
([] (vcr-memory-store (atom {})))
- ([s] (VcrMemoryStore. s)))
+ ([s] (VcrMemoryStore. s)))
View
2 test/vcr_clj/recorder_test.clj
@@ -12,10 +12,8 @@
(record-request! store :k "value")
(is (request-recorded? store :k))))
-
(deftest request-recorded-test
(let [store (vcr-memory-store)]
(record-request! store :k "value")
(clear-recorded! store)
(is (= @(get-all store) {}))))
-

0 comments on commit 4a383d0

Please sign in to comment.