Problems with or Combinator

68 views
Skip to first unread message

Daniel Spiewak

unread,
Sep 7, 2012, 4:40:03 PM9/7/12
to specs2...@googlegroups.com
(1 mustEqual 2) or (2 mustEqual 2)

This fails with "1 is not equal to 2" in the context of a mutable.Specification.  Needless to say, this is wrong.  :-)

Daniel

etorreborre

unread,
Sep 7, 2012, 5:49:10 PM9/7/12
to specs2...@googlegroups.com
Right, the "or" method is a "Result" method, but if that "Result" throws an exception...

The solution is to move "or" to an implicit conversion, I hope that's not going to bring implicit resolution hell.

I'll see what I can do about that.

etorreborre

unread,
Sep 9, 2012, 7:36:50 AM9/9/12
to specs2...@googlegroups.com
That was indeed not a single file change, but that should work ok now in the latest 1.12.2-SNAPSHOT.

Thanks for defending Boolean logic!

Eric.

Daniel Sobral

unread,
Sep 10, 2012, 12:29:30 PM9/10/12
to specs2...@googlegroups.com
Speaking of boolean, it broke the use of Boolean with it:

[error] /home/dcs/github/eleicoes2012/tseDownloader/src/test/scala/ArquivoSpec.scala:32: value and is not a member of Boolean
[error]           request.isInstanceOf[RequestBuilder] and request.url === urlEsperada
[error]                                                ^
[error] one error found
--
Daniel C. Sobral

I travel to the future all the time.

etorreborre

unread,
Sep 10, 2012, 8:39:11 PM9/10/12
to specs2...@googlegroups.com
Fixed in the latest 1.12.2-SNAPSHOT, thanks.
Reply all
Reply to author
Forward
0 new messages