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

:fact-filter breaks on creation-time checking #380

Open
totakke opened this issue Mar 9, 2017 · 2 comments
Open

:fact-filter breaks on creation-time checking #380

totakke opened this issue Mar 9, 2017 · 2 comments

Comments

@totakke
Copy link

totakke commented Mar 9, 2017

(change-defaults :fact-filter (complement :slow))

in .midje.clj works when calling load-facts or running tests through lein-midje. The test ignores :slow facts as expected.

However, creation-time checking when loading a namespace does not ignore :slow facts.

@rafaeldff
Copy link
Collaborator

@totakke can you expand on what do you mean by creation-time checking?

@totakke
Copy link
Author

totakke commented Jun 6, 2017

@rafaeldff Sorry, creation-time checking means automatic checking just after ns loaded. For example, when there are the following tests

(fact "normal"
  0 => 1)

(fact :slow "slow"
  1 => 2)

on .midje.clj

(change-defaults :fact-filter (complement :slow))
$ lein midje #=> normal fact is tested
$ lein midje :filter slow #=> slow fact is tested

This is expected. But creation-time checking ignores .midje.clj, running both tests.

user=> (require 'example.t-core)
;; => normal and slow facts are tested

In my case, cider-refresh hanged because it triggered to run slow tests.

(change-defaults :check-after-creation false)

disables creation-time checking, but it disables lein midje too.

$ lein midje
No facts were checked. Is that what you wanted?

are these behaviors expected?

@totakke totakke changed the title :fact-filter bleaks on creation-time checking :fact-filter breaks on creation-time checking Jun 16, 2017
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

2 participants