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
how to make editsource:edit to run before tests #9
Comments
I'll have to look into this one. I never intended this to be used during testing, but it's a reasonable request. |
Yes, that would be nice. I wish i could help right away, actually, but still have to learn a bit more on how to code sbt plugins and all. (BTW, if i may ask: if you could share a tentative, rough and uncommitted time on when you could possibly get to it, please let me know: that will help me plan how to get over this problem in the short-medium term) |
(To give context to this, if you are interested, this is about setting up unit tests with an in-memory database like h2 or hsqldb. In either case, when i create a Connection object in unit tests, the url cannot contain a relative file path: Connection requires it to be absolute. So, if i want to save the url string in |
With the latest version, this might work: test in Test := ((test in Test) dependsOn (edit in EditSource)).value |
After trying and re-trying , was not able to use this plugin to do token substitution before unit tests are run.
Maybe i am not using sbt well enough, but i was trying something as easy as:
to make tests do their work after token resolution, but it does not work.
Maybe i am missing something obvious, but it would still be great if this were in the instructions, i think, which i could add myself if so desired.
Please note that when i run
sbt editsource:edit
it does work: files undertarget
are resolved.But when i run
sbt test
, my unit tests fail: if i look into thetarget
dir, the files that were correctly resolved byeditsource:edit
are now unresolved (they contain${baseDirectory}
strings inside them).The text was updated successfully, but these errors were encountered: