Fork me on GitHub

Hi everyone! I’m looking to get into testing in clojure - coming from the ruby world I’m used to rspec and minitest. What would the equivalents be in clojure? Is there a library that is basically a de facto standard that most people use?


I've used rspec and clojure for a similar amount of years I'd say practically everyone is on board with clojure.test here, which is rawer than rspec but also very simple and stable. One thing that tends to trip people up is that clojure.test/testing blocks simply are for documentation purposes - they don't trigger fixtures or such. is interesting becase it's richer (like rspec) while still sticking to clojure.test which means it will work over many IDEs and test runners


I also recommend my own lib check, if you want to use ClojureScript with async tests :)


If you want better matchers, expectations or nubank/matcher-combinators are great tools.


Thanks for the replies! clojure.test it is then 🙂 Will also check clojure-expectations/clojure-test


@robin.saaf clojure.test is built-in and all the tooling/editors support that. Coming from an Rspec world, you might find expectations.clojure.test more to your liking -- -- and it is compatible with clojure.test so all the same tooling/editors work with it as well. At work we use a mixture of both of these libraries. There's an #expectations channel for deep dives on it but I'm happy to answer Qs about it here or there. (note: the "Classic" Expectations is not compatible with clojure.test and has its own tooling/editor integrations, which is why I created the newer clojure.test-compatible version)


Great, will dive into clojure.test as well as check out expectations.clojure.test. Thanks for the reply!