Skip to content

Commit

Permalink
Adding dumping to disk
Browse files Browse the repository at this point in the history
  • Loading branch information
ifesdjeen committed Oct 31, 2012
1 parent 05d39c2 commit 4a383d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/vcr_clj/recorder.clj
Expand Up @@ -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)))
2 changes: 0 additions & 2 deletions test/vcr_clj/recorder_test.clj
Expand Up @@ -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.