Giter Site home page Giter Site logo

prism's Introduction

Prism

Running tests with lein test means waiting for the JVM startup, and waiting for the project to compile. Prism recompiles and reloads files as you change them, and re-runs their corresponding tests immediately. Inspired by Midje's excellent autotest.

Usage

Check out Clojars for the latest version number, then add Prism to ~/.lein/profiles.clj:

{:user
 {:plugins [[com.aphyr/prism "0.1.1"]]
  :dependencies [[com.aphyr/prism "0.1.1"]]}}

You could alternatively add Prism to the dev dependencies in a given project--but this lets you use Prism against any project regardless of its project.clj.

Then, just run lein prism in your project directory. It'll do a full test first, then as you write .clj files, it'll re-run the corresponding test namespace. Prism assumes your tests are named foo.core-test.

Brought to you by

Raynes and Aphyr!

Why "Prism"?

It may be snooping on everything you write, and checking to make sure it's not dangerous. Or maybe not! Exciting!

License

Released under the Eclipse Public License; the same as Clojure.

prism's People

Contributors

raynes avatar aphyr avatar ciniglio avatar kendru avatar lanny avatar

Stargazers

Glenn Jahnke avatar Eric Dallo avatar Andrey Bogoyavlenskiy avatar  avatar Tristram Oaten avatar Vlad Trukhin avatar swlkr avatar Pawel Kapala avatar Laco Gubík avatar Boris Kourtoukov avatar Tienson Qin avatar  avatar Ferris avatar Eric Fode avatar Anders Eknert avatar Timur Batyrshin avatar Konrad avatar davylin avatar Roman Heinrich avatar Ruslan Prakapchuk avatar Sebastián Moreno avatar Brian Hurlow avatar Ryan Roemmich avatar Mohammad Sadegh Khoeini avatar Tom avatar Kyrre Wahl Kongsgård avatar Ivan Ryakhov avatar Alexander Petrov avatar Darrell Hamilton avatar Tom Hickey avatar Chris McDevitt avatar Josh Black avatar Thom Lawrence avatar Max Countryman avatar Ryan McGowan avatar Cayenne Geis avatar Daniel Jomphe avatar Timothy Hahn avatar Timo Mihaljov avatar da3mon avatar  avatar Josh Rieken avatar Marco Chomut avatar Dmitri Sotnikov avatar Chris A. avatar Bruce Durling avatar  avatar Alex Kehayias avatar Julien avatar Jeremy Heiler avatar Henrik Feldt avatar  avatar Volodymyr Epifanov avatar Luca Antiga avatar Ian Bishop avatar Dave Della Costa avatar Ronen avatar Justin Campbell avatar Aaron Miller avatar

Watchers

 avatar Ivan Willig avatar  avatar Bruce Durling avatar  avatar aliraza avatar James Cloos avatar  avatar

prism's Issues

Run tests when file under resources is changed

I am working on a small parser using instaparse. I store the parser grammar under the resources directory. Whenever I change the grammar (which is referenced from a source file) I would like the tests to be re-run. I would not mind if this results in a full test as it may be difficult to figure out which source file depends on a resource file.

In general I think that prism should rerun tests whenever a file under the classpath is changed.

Run prism under test leiningen profile

I'm wondering if it would be possible to run prism under the test profile like a regular lein test run.

What I noticed is that when you start prism, it will make a normal full lein test run under the test profile. After that is done, it appears to spin up a new instance of the app (a Ring app in my case) under a different profile than test, possibly dev, which in my specific situation leads to several undesirable side-effects. In my case, there's much more logging under dev, and nrepl starts, whereas under the test profile all of these options are disabled.

I think that if under regular lein test you can make the assumption that the test profile will be used, it would be also reasonable to expect auto-test plugins to also leverage the same leiningen profile.

Perhaps I'm doing this wrong and would love to know what your thoughts are on this.

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.