Hi Stephanos,
I actually plan to start working on 2.10 related features when it's
officially out (more for lack of time than anything else) and Expecty is an
interesting feature indeed.
You should be able to start using it now because when something fails
Expecty throws an AssertionError that should be caught by specs2 (hmm, I
might to make a slight change for this to be properly supported though, so
that those "errors" are interpreted as specs2 "failures").
However, in the future I'll probably do a slightly different integration
than the one using "expect" blocks because their functionality (fail the
whole block after the first assertion fails or report all failures)
overlaps with existing specs2 functionality (see the AllThrownExpectations
trait). Also I have to integrate Expecty's reporting to the "be_==" matcher.
So this is quite some work and I need to get up to speed with the
macro/reflection framework first!
Eric.
PS: also, I wonder how useful Expecty is in practice, with real-world data
which can be quite verbose to display sometimes
On Monday, October 22, 2012 12:36:23 AM UTC+11, stephanos wrote:
> Hi,
> I was wondering if there are any plans to leverage the new macro features
> to do something like expecty <https://github.com/pniederw/expecty>:
> expect {
> person.name == "Fred"
> person.age * 2 == 84
> person.say("Hi", "from", "Expecty!") == "Hi from Expecty!"}
> Cheers
> Stephan