I'm running the following test
Idea.findById(1).get.tags must equalTo(List[String]("internet, tecnología"))
and I'm getting the following error
[info] Idea.tags should
[error] x should retrieve a list of tag names for the idea
[error] 'internet, tecnología': anon is not equal to 'internet, tecnología': scala.collection.immutable.:: (IdeaTagSpec.scala:42)
this is the method I'm trying to test
lazy val tags: List[String] = {
Tag.findByIdea(this).map(_.name).toList
}
I could solve it with this ugly hack
( Idea.findById(1).get.tags.toString
must equalTo(List[String]("internet, tecnología").toString)
)
But I'm sure there's a better way to do it...
-- EDIT --
sorry, it was a silly mistake on my part (It should habe been List("internet", "tecnologia") instead)
anyway the error message was quite misleading, that's why I'm leaving this question here...