Giter Club home page Giter Club logo

test-first-clj's Introduction

test-first-clj

Created in the spirit of testfirst.org, test-first-clj strives to teach clojure and introduce some of it's tooling at the same time. Many of today's most popular learn-to-code tools are dressed up unit tests, but using them in that environment deprives the learner of grokking the power of testing, and keeps the syntax secret.

The test-first-clj library is still very much a work in progress. If you have an idea for a kata, or would like to help port over coding exercises from another language PRs are very much welcome!

Installation

  • Install lein
  • Run git clone https://github.com/HenryMarshall/test-first-clj
  • cd test-first-clj
  • lein deps

Usage

  • Run lein test-refresh :only test-first-clj.00-greet-test
  • Create src/test_first_clj/00_greet.clj
  • Make the tests pass!
  • Kill the lein process (Control-c)
  • Run lein test-refresh again, replacing 00-greet-test with the next assignment

Tips

When you first get started, clojure.test won't give you a pretty list of failing tests because it won't be able to load the dependencies. You'll see something like the following:

Exception in thread "main" java.io.FileNotFoundException: Could not locate test_first_clj/00_greet__init.class or test_first_clj/00_greet.clj on classpath.

Just create the appropriate src file to proceed.


Likewise, clojure may complain that it's "unable to resolve symbol". That likely means it can't find the appropriately named function. Create it in the src file.

Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: greet in this context, compiling:(test_first_clj/00_greet_test.clj:7:10)

Todo

  • Add different profiles.clj files in different branches to make various REPL based testilng workflows more convenient.

License

Copyright © 2017 Henry Marshall

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

test-first-clj's People

Contributors

henrymarshall avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.