Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lein midje :autotest does not run facts #434

Open
phtrivier opened this issue Jun 28, 2014 · 15 comments
Open

lein midje :autotest does not run facts #434

phtrivier opened this issue Jun 28, 2014 · 15 comments

Comments

@phtrivier
Copy link

Probably a stupid setup issue here, but when using "lein midje :autotest", the tests are run the first time, but after that, editing the source file only shows a "No facts where checked. Is that what you wanted?" message. What should I check ?

@freeman
Copy link

freeman commented Sep 15, 2014

Same issue here ...

@koss
Copy link

koss commented Nov 3, 2014

I got it to work by copying the tests from the test project into the local test file. Cool. Onward to learn Clojure!

@qmacro
Copy link

qmacro commented Jan 6, 2015

FWIW, I am also experiencing this issue, and worked around it using the same approach as @koss but surely it was designed like this (tests abstracted away) deliberately, i.e. Should Work (tm)?

@echox
Copy link

echox commented Jan 16, 2015

exactly the same issue here :-/
are there any other workarounds?

@joao-sallaberry
Copy link

Same here.

@wilzbach
Copy link

wilzbach commented Nov 8, 2015

+1
(I would love to see a proper solution in the guidelines)

@notno
Copy link

notno commented Jan 31, 2016

+1

6 similar comments
@ahoffer
Copy link

ahoffer commented Mar 1, 2016

+1

@nashamri
Copy link

nashamri commented Apr 2, 2016

+1

@mikaelsn
Copy link

+1

@Juholei
Copy link

Juholei commented Jun 7, 2016

+1

@Maksym-L
Copy link

+1

@christiaan-janssen
Copy link

+1

@dancek
Copy link

dancek commented Sep 27, 2016

A better workaround (imho) is to run lein repl, which fires up a JVM with all the dependencies loaded. Then run tests like this:

(use 'midje.repl)
(load-facts 'iloveponies.tests.structured-data 'structured-data)

Obviously change the correct namespaces, eg. replace each structured-data occurence with training-day. After that just press the up arrow to get the same input line again (or use plain (load-facts), which assumes the same namespaces as previous call had).

Yes, still a PITA, but much faster than running lein midje.

@dancek
Copy link

dancek commented Sep 28, 2016

It's also useful to call load-facts with a lower loglevel, so you don't get many screenfuls of failures when starting out.

user=> (load-facts -2)
{:failures 38}
user=> (load-facts -2)
{:failures 36}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests