Hi,
The Wiki example specification, which was previously specified using
JMock broke when we migrated to Scala 2.7.2 (compiler issue, couldn't
solve it).
However, the latest version of specs (1.4.4-SNAPSHOT) provides an
integration with Mockito which is even nicer when just doing stubbing.
So the Wiki Specification is now back on track and you can pull it
from git.
I want to note also one thing. The way the original example was
written wasn't very stub-friendly, so I had to change:
object WikiEntry extends WikiEntry with LongKeyedMetaMapper[WikiEntry]
to
object WikiEntry extends MetaWikiEntry // introduced the MetaWikiEntry
trait
trait MetaWikiEntry extends WikiEntry with LongKeyedMetaMapper
[WikiEntry]
and
class Wiki {
import WikiEntry._
to
// using the MetaWikiEntry trait to stub the database accesses
class Wiki extends MetaWikiEntry {
My hope is that Powermock (http://code.google.com/p/powermock) is
going to catchup with the latest version of Mockito and that we'll be
able to mock/stub any static method. In the meantime, I would advise
to avoid "static imports", like "import WikiEntry._" to facilitate
specifications/testing.
Cheers,
Eric.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---