diff --git a/src/clj/com/rpl/specter.cljx b/src/clj/com/rpl/specter.cljx index 210356a..738e24d 100644 --- a/src/clj/com/rpl/specter.cljx +++ b/src/clj/com/rpl/specter.cljx @@ -281,7 +281,7 @@ (defpath ^{:doc "Navigates to atom value."} - atompath + ATOM [] (select* [this structure next-fn] (next-fn @structure)) diff --git a/test/com/rpl/specter/core_test.cljx b/test/com/rpl/specter/core_test.cljx index c9bf24e..88ee545 100644 --- a/test/com/rpl/specter/core_test.cljx +++ b/test/com/rpl/specter/core_test.cljx @@ -235,6 +235,11 @@ (is (= 5 (s/select-one (s/comp-paths :a :b) {:a {:b 5}}))) ) +(deftest atom-test + (let [v (s/transform s/ATOM inc (atom 1))] + (is (instance? clojure.lang.Atom v)) + (is (= 2 (s/select-one s/ATOM v) @v)))) + (defspec view-test (for-all+ [i gen/int