cljunit icon indicating copy to clipboard operation
cljunit copied to clipboard

Use cljunit in lein project

Open pwhittin opened this issue 7 years ago • 2 comments

Is there an example of integrating cljunit within a lein project?

I can't figure out where the

import mikera.cljunit.ClojureTest;

public class ClojureTests extends ClojureTest {
	// filter namespaces with the given prefix
	@Override public String filter() {
	    return "com.mycompany";
	}
}

type code is supposed to go, or what it's supposed to look like, exactly.

pwhittin avatar Sep 29 '17 22:09 pwhittin

Well that's jave code, so it should go in a .java file somewhere in a Java source directory, e.g. src/main/java. You can set the Java source path in your project.clj

But cljunit probably isn't needed anyway if you are already using lein - you should just be able to use lein test surely?

mikera avatar Sep 30 '17 05:09 mikera

Yes. I'm perfectly happy with using lein test, actually ```lein test-refresh````, but I'm trying to get others to adopt Clojure. They are used to looking at the JUnit green bar within Eclipse. I was hoping I could get the same kind of user experience using cljunit.

pwhittin avatar Sep 30 '17 23:09 pwhittin