Open dmarcato opened 8 years ago
+1
+1
+1
+1
+1
+1
+1
Not a Robolectric user at the moment, can't you just extend
RobolectricTestRunner
and add functionality of JUnitSpekRunner
to it?
On Mon, Aug 8, 2016 at 7:52 PM, Ivan notifications@github.com wrote:
+1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JetBrains/spek/issues/65#issuecomment-238298607, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7B3DnUI_Bf5Wv0N31NDwq7atXPtC8tks5qd17RgaJpZM4HjK-5 .
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
Does anyone have any ideas on an implementation of having Spek work with RoboElectric. I have tried to take a look, but I am a bit lost... If someone can point me in the right direction, I am happy to see what I can do
Thanks
@JackED42 see InstanceFactory
and @CreateWith
since most likely you will need to use custom class loaders.
+1
+1
+1
+1
+1
I can add support for robolectric by writing a custom test engine (it will be a copy of Robolectric's test runner). There will be few limitations such as configs per test since I don't know how can we annotate a test in spek.
@bangarharshit thanks, as much as possible we prefer to decouple the implementation from JUnit. The idea is to implement it using Spek's API. We provide @CreateWith
probably a good place to start.
@bangarharshit hello, have you made the implementation or support for RoboElectric
really would be very interesting, thanks in advance
The pr is almost ready. I will be adding tests and test with different Android configurations before sending the PR. Definitely by end of this week.
What happened to this? Does Spek to Robolectric integration work?
Looks like it fell out of interest. I'm not an android developer, so I don't know how to implement this properly. Would really appreciate someone doing android development pick this up.
Planning to look at this soon.
Underway here: https://github.com/robolectric/robolectric/pull/5520
Currently, Spek doesn't play well with Robolectric :disappointed:
The reason is that Robolectric requires a
BlockJUnit4ClassRunner
, but Spek requires its ownJUnitClassRunner
. The exception thrown is:Would it be possible to support framework like Robolectric?