Permalink
Browse files

Move tests from test_java.clj to test_string.clj

  • Loading branch information...
1 parent 3093440 commit faa392bb82018203a82d56013aa8b55c89ef2b5f @stuartsierra stuartsierra committed Feb 11, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/test/clojure/clojure/contrib/test_string.clj
@@ -113,3 +113,12 @@
(deftest t-get
(is (= \o (s/get "foo" 1))))
+(deftest t-as-str
+ (testing "keyword to string"
+ (is (= "foo") (s/as-str :foo)))
+ (testing "symbol to string"
+ (is (= "foo") (s/as-str 'foo)))
+ (testing "string to string"
+ (is (= "foo") (s/as-str "foo")))
+ (testing "stringifying non-namish things"
+ (is (= "42") (s/as-str 42))))

0 comments on commit faa392b

Please sign in to comment.