These are chat archives for etorreborre/specs2

31st
Aug 2016
ykycxzsv
@ykycxzsv
Aug 31 2016 09:45
is there a migration guide or something for upgrading from 2.x to 3.x?
Eric Torreborre
@etorreborre
Aug 31 2016 09:46
but please ask any questions here
it vastly depend on how deep you use the APIs
ykycxzsv
@ykycxzsv
Aug 31 2016 09:50
i don't really know, i'm not familiar with the code i'm supposed to upgrade. :) but thanks, first up is missing NoToHtmlLinkFragments. i notice the release notes mention a new fragments api
Eric Torreborre
@etorreborre
Aug 31 2016 09:52
try this one instead:org.specs2.specification.dsl.NoFragmentsDsl
ykycxzsv
@ykycxzsv
Aug 31 2016 09:56
thanks, that compiles at least. there's also a bit of a strange error about org.specs2.execute.Pending not taking arguments, but it's clearly a case class that takes a string
oh wait, there's a whole code block passed in as well
"something" in Pending("something") { .... }
ykycxzsv
@ykycxzsv
Aug 31 2016 10:04
it may be triggered by an earlier error, it seems org.specs2.mutable.Specification is missing the "should" method
ah no, it's there, just get flagged as error because of the Pending stuff
Eric Torreborre
@etorreborre
Aug 31 2016 10:05
let me check this. It is possible that this construct disappeared
I think the method disappeared
you can resurrect it by adding def pending[R : AsResult](message: String)(r: =>R): Pending = pending(message)
otherwise the def pending[R : AsResult](r: =>R): Pending = pending method exists but you cannot specify a custom message
ykycxzsv
@ykycxzsv
Aug 31 2016 10:11
i see! why doesn't it work with Pending("something") though? that seems to be how pending is implemented. maybe it's a precedence thing
Eric Torreborre
@etorreborre
Aug 31 2016 10:12
For this to work you would need an apply method on Pending
ykycxzsv
@ykycxzsv
Aug 31 2016 11:31
thanks for the help! it seems to work now after some snags unrelated to specs2 itself
Eric Torreborre
@etorreborre
Aug 31 2016 13:03
Yay!