marick / lein-midje

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

lein midje should load the :midje profile, if present. #55

Closed elarkin closed 9 years ago

elarkin commented 9 years ago

There are some settings that I would like to set only for test runs (like changing the java-opts to use a different log4j configuration properties file).

Currently, I can place those settings in the :dev profile, but those settings also take effect when using "lein run"

This enhancement allows me to have a midje-specific profile in which to house those settings.

hantuzun commented 9 years ago

We would like to have this feature as well. Thanks!

marick commented 9 years ago

Sorry for the delay.

marick commented 9 years ago

When I run lein midje with a project file that doesn't have a :midje profile, I get:

(Warning: profile :midje not found.)

It's not obvious to me how to get rid of this. Help?

marick commented 9 years ago

Additional question: Is it intended that midje itself be in the :midje profile, like this:

  :profiles {:midje {:dependencies [[midje "1.7.0"]]}

That won't work for many (most?) people because it won't work with the common usage:

% lein repl
user> (use 'midje.repl)
user> (autotest)
marick commented 9 years ago

Oops, I see that the previous question was answered in the original pull request.

marick commented 9 years ago

I fixed the warning problem with https://github.com/marick/lein-midje/blob/master/src/leiningen/midje.clj#L160 I don't know how good a fix that is.