Book Image

Clojure Web Development Essentials

By : Ryan Baldwin
Book Image

Clojure Web Development Essentials

By: Ryan Baldwin

Overview of this book

Table of Contents (19 chapters)
Clojure Web Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. Testing in Clojure

Testing is quite possibly the most controversial topic in software development I've ever seen. Some developers are passionate about the merits of automated testing, what should be tested, and how. Conversely, some developers are dead set against automated testing. This can be especially so in languages that come with a REPL. That being said, Clojure still ships with a clojure.test namespace. As such, this chapter will focus primarily on how we can use clojure.test to write tests for our hipstr.validators.user namespace. In this chapter, we will:

  • Explore the necessity of automated testing in Clojure (hint: I believe there is always room for testing)

  • Discuss how to write assertions and tests, and how to run them

    Tip

    What this chapter won't cover, however, is extensive philosophy, patterns, and so on. Automated testing is a huge topic, one that I've studied for over ten years, and still have an enormous amount to learn. The purpose of this chapter is to show you enough...