Hi,

I have noticed this and I always run mvn clean before running the
tests or just compiling them. So I get the issue even I run the clean
command.

-erik

David Pollak kirjoitti:
> Erik,
>
> Please do an:
>
> mvn clean test
>
> From the command line.
>
> The Eclipse plugin uses a different version of Scala than does Lift.  There
> will be weird errors like the one you've seen.
>
> Thanks,
>
> David
>
> On Mon, Apr 27, 2009 at 2:24 PM, [email protected] <
> [email protected]> wrote:
>
> >
> > Weird thing is  that I'm able to mock "MetaTeam":
> >
> > ---
> > trait MetaTeam extends Team with LongKeyedMetaMapper[Team] {
> >  def findByUser(user:User): List[Team]
> > }
> >
> > object Team extends MetaTeam {
> >  def findByUser(user:User): List[Team] =
> >    UserTeam.findAll(
> >      By(UserTeam.user, user.id),
> >      OrderBy(UserTeam.team, Ascending)).map(_.team.obj.open_!)
> > }
> > ---
> >
> > - Erik
> >
> > On Apr 28, 12:19 am, "[email protected]"
> > <[email protected]> wrote:
> > > Hi,
> > >
> > > I have set of specs test and I'm using mockito
> > >
> > > I noticed that if I have a list of Users (pretty much same class that
> > > is coming from archetype) and do following test:
> > >
> > > users(1).firstName must beEqualTo(name2)
> > >
> > > Then I get :
> > > [WARNING] Exception in thread "main" java.lang.RuntimeException:
> > > malformed Scala signature of User at 13798; reference type _5 of
> > > <none> refers to nonexisting symbol.
> > >
> > > If the line is changed to:
> > >
> > > (users(1).firstName == name2) must beTrue
> > >
> > > it compiles really nicely. Based on previous posts here it seams to be
> > > that this is scala bug (I use 2.7.4|3)
> > >
> > > Much bigger problem for me is that when trying to mock the User:
> > >
> > > var userDbMock = mock[MetaUser]
> > >
> > > causes the same issue:
> > > [WARNING] Exception in thread "main" java.lang.RuntimeException:
> > > malformed Scala signature of User at 13798; reference type _5 of
> > > <none> refers to nonexisting symbol.
> > >
> > > MetaUser is trait:
> > >
> > > object User extends MetaUser {
> > >
> > >   override def dbTableName = "users" // define the DB table name
> > >   override def screenWrap = Full(<lift:surround with="default"
> > > at="content">
> > >                                <lift:bind /></lift:surround>)
> > >   // define the order fields will appear in forms and output
> > >   override def fieldOrder = List(id, firstName, lastName, email,
> > >   locale, timezone, password, textArea)
> > >
> > >   // comment this line out to require email validations
> > >   override def skipEmailValidation = true
> > >
> > > }
> > >
> > > trait MetaUser extends User with MetaMegaProtoUser[User]  {
> > >
> > > }
> > >
> > > Have anybody encountered similar problem when mocking or even found a
> > > workaround for this case?
> > >
> > > br,
> > > - Erik
> > >
> > > PS. Weirdest thing is that I'm able to run the test cases in
> > > Eclipse...
> >
> > >
> >
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to