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

:autotest does not rerun tests in external dependencies #62

Open
ilmoraunio opened this issue Apr 11, 2017 · 1 comment
Open

:autotest does not rerun tests in external dependencies #62

ilmoraunio opened this issue Apr 11, 2017 · 1 comment

Comments

@ilmoraunio
Copy link

ilmoraunio commented Apr 11, 2017

Description

lein midje :autotest will not rerun tests in external dependencies after modifying .clj files under src/ folder.

Steps to reproduce bug (example project)

  1. Clone training-day repository git clone https://github.com/iloveponies/training-day.git
  2. Go to project directory and run lein midje :autotest. 6 checks should fail.
  3. Edit square fn in src/training_day.clj to return (* x x) instead of ":(".
  4. Midje should return "No facts were checked. Is that what you wanted?"

Actual expectation

lein midje :autotest should really be returning "3 checks failed. (But 3 succeeded.)" in step 4, but it doesn't seem to reload the external dependencies where the tests are located.

The test file training_day_test.clj contains only a reference to a namespace containing all of the tests:

(ns training-day-test
  (:use iloveponies.tests.training-day))

This is the only test file in this project.

Related to #48. Also related issues from iloveponies' repositories:

@ilmoraunio
Copy link
Author

ilmoraunio commented Apr 11, 2017

A way to bypass the problem is to require the tests in a separate function call and require the namespace-under-test under ns:

(ns training-day-test
  (:require [training-day :refer :all]))

(require 'iloveponies.tests.training-day :reload)

For me it's still unclear, if it's a bug in midje or a feature of clojure.

erno added a commit to erno/training-day that referenced this issue Apr 27, 2017
suniala added a commit to suniala/p-p-p-pokerface that referenced this issue Feb 24, 2018
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

1 participant