I found an article on medium about setting up Spek...
# spek
c
I found an article on medium about setting up Spek2 and thought I’d give it another look. The steps all worked, but you have to run the tests by right clicking on the folder. Is there no runner? that would make it possible to run tests from within the source?
r
Can you link to me the article? If you have the spek plugin installed then you can run a test (via a gutter icon) within the editor. https://plugins.jetbrains.com/plugin/10915-spek-framework/
c
hi @raniejade maybe you remember me.. ok cool lemme install the plugin, they don’t mention it, but I should have remembered that from last time..
I installed the plugin, but am still not seeing the ability to run inside the IDE.. ?
image.png
r
That’s weird. What version of the ide and spek plugin do you have?
c
using the latest 4.0 Preview of AS for doing Compose stuff
just installed the plugin last night?
image.png
r
Ohh that’s the plugin for spek1. Search for Spek Framework.
c
omg
image.png
so I guess there was a step missing
looking for
kotlin-reflect
in the classpath
god is programming ever gonna crawl out of this slime pit?? what a waste of time.. added this:
Copy code
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
and it synced properly, seemed ok, built, still doesn’t run.
r
Can you share your project? I’ll have a look later (currently at work).
c
are you around @raniejade? I am about to go back to my prior policy that seemed sane: never use this tool again..
omg, I spent a lot of time on the reflect,
testRuntimeOnly
did not work, I got it to run the tests by changing it to:
Copy code
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
then it ran, but the details of the tests run are not shown??
image.png
r
You have to click the check icon, IJ hides by default successful tests.
c
another long tract of time poured into a useless pit
haha ok
I opened it
but did not click the check
any idea why the
testRuntimeOnly
does not work?
(wasted way too much time holding out the belief that that had to be the right way….)
r
Not really, have you tried with AS 3.5? I’ll have a look as well later.
c
no
thanks @raniejade this all works now, ’cept for the runtime thing.. looks like a lot has changed with the syntax, will get reacquainted, one of the things I like most about BDD is better ability to have structure in the tests, and the run results as a consequence..
r
No worries, what did you do to fix it?
c
Well nothing new, as I said I could not get the runtime setting to work. When I just added it as a test dependency, it worked, as per above.
@raniejade did you forget about this??
r
ohhh, indeed. 🤦‍♂️