luminus-framework / luminus-template

a template project for the Luminus framework
http://www.luminusweb.net/
MIT License
647 stars 147 forks source link

lein test fails after lein new since template 3.37 #446

Open rberger opened 5 years ago

rberger commented 5 years ago

Looks like the change from starting with a component to starting with the function app has broken the default test at least with the command lein new luminus myapp +re-frame +h2 since template version 3.37 (it fails the same with from 3.37 to the current 3.41).

lein new luminus myapp +re-frame +h2
cd myapp
lein test

The test fails with

lein test :only myapp-3.37.test.handler/test-app

ERROR in (test-app) (AFn.java:429)
Uncaught exception, not in assertion.
expected: nil
  actual: clojure.lang.ArityException: Wrong number of args (1) passed to: myapp-3.37.handler/app
 at clojure.lang.AFn.throwArity (AFn.java:429)

If I revert the changes in src/clj/myapp/{handler.clj,core.clj} to not have app be a function, the test runs fine.

yogthos commented 5 years ago

Thanks for the heads up. I've updated the tests to initialize the handler correctly, so the new version should work as expected. Let me know if it looks good on your end.

duncan-bayne commented 5 years ago

FWIW I was experiencing this problem (hence discovering this issue :) ), but 3.42 fixes it for me.