marick / lein-midje

Leiningen plugin for Midje
MIT License
77 stars 29 forks source link

Wildcard namespace matcing doesn't work #27

Closed lynaghk closed 11 years ago

lynaghk commented 11 years ago

Under lein2-preview10 with midje 0.4.0 and lein-midje 2.0.0-SNAPSHOT wildcard namespace matching doesn't pick up existing facts. Tests are under the ccplot.t-compile namespace in the file <project_root>/test/ccplot/t_compile.clj. Running lein midje ccplot.* finds 0 facts, even though two exist within that file and running lein midje or lein midje ccplot.t-compile both work fine.

cch1 commented 11 years ago

I can confirm similar behavior with lein-midje 2.0.1

mwmitchell commented 11 years ago

There's a pull request for this now: https://github.com/marick/lein-midje/pull/30

smnirven commented 11 years ago

+1 on this -- having the same issue. Can we get that pull request incorporated and a new version? Thanks!

marick commented 11 years ago

That's peculiar. I see it not working now that I've upgraded to lein2.

In any case, I've been working on pushing lein-midje behavior into a new midje.repl namespace, and loading from the repl does work:

user=> (use 'midje.repl)
Welcome to the ~ config file.
For Midje usage, run `(midje-help)`.
For Midje configuration options, run `(midje-configuration-help)`.
Run `(midje-repl-help)` for descriptions of Midje repl functions.
nil
user=>(load-facts midje.*)
= Namespace midje.checkers.t-chatty
= Namespace midje.checkers.t-collection
= Namespace midje.checkers.t-collection-old
= Namespace midje.checkers.t-combining
...

After I finish these tools, I'll convert lein-midje to use them, so that will fix the problem (as long as you're willing to use prerelease versions of Midje 1.5).

marick commented 11 years ago

P.S. The "print the namespace as you load it" is also a new feature, which can be turned on per-user or per-project.

marick commented 11 years ago

I've merged the pull request.

marick commented 11 years ago

New version is 2.0.2. Pushed to clojars.

mwmitchell commented 11 years ago

Thank you! You've made a lot of people very happy today.

On Fri, Nov 30, 2012 at 1:35 PM, Brian Marick notifications@github.comwrote:

New version is 2.0.2. Pushed to clojars.

— Reply to this email directly or view it on GitHubhttps://github.com/marick/lein-midje/issues/27#issuecomment-10898835.