etorreborre/specs2 — pull request #212 by asflierl (2013-11-06 07:15:41+00:00)
Title: name clash of two ```lazyfy``` methods

Hi Eric,

sorry, it's me again with an issue and a proposed fix for it:

in the spec below, the ```lazyfy``` method documented on the Forms page actually clashes with a ```lazyfy``` method in ```org.specs2.control.LazyParameter``` which then, instead of producing a column with lazy prop cells, creates a column with value cells.

```scala
package meep

import org.specs2._
import org.specs2.form._
import org.specs2.specification._

class MeepSpec extends Specification with Forms { def is =
s2"""
The road runner should run and meep. $e1
"""

def e1 =
Meeper.
th("movement", "sound", "movement & sound").
tr("running", "meep", "running & meep").
tr("waling", "toot", "walking & toot")

case class Meeper(form: Form = Form()) {
def tr(movement: String, sound: String, movementAndSound: String) = Meeper {
def both = prop(movement + " & " + sound)(movementAndSound)
form.tr(movement, sound, lazyfy(both)) // <--------------------------- here :o)
}
}
object Meeper {
def th(title1: String, titles: String*) = Meeper(Form.th(title1, titles:_*))
}
}
```

I renamed the ```lazyfy``` method in ```LazyParameter``` to ```lazyParameter``` because that seemed the most simple solution and also it doesn't seem to be part of the public API.

The other 2 commits are "boy scout rule" commits. Please ignore them if you don't like them. :) The first avoids a possible multiple evaluation of the lazy parameter, the second renames "lazyfy" to "lazify" which I think would probably the correct spelling if lazify was actually word (but I'm not a native speaker, so please forgive me if I'm wrong there). Also, this possibly breaks user code (probably not too much though, or you'd have a bugreport against the name clash already). :o)

Anyway, as usual, I hope this helps.

Kind regards
Andreas