Sha256: b5f30e440124258cd60a45fb8b3d3aa2a76fcf435b4d44317636b4e52751fb61
Contents?: true
Size: 693 Bytes
Versions: 41
Compression:
Stored size: 693 Bytes
Contents
import org.scalatest._ class RobotNameSpecs extends FunSpec with Matchers { val nameRegex = """[A-Z]{2}\d{3}""" it ("has a name") { new Robot().name should fullyMatch regex (nameRegex) } it ("does not change its name") { pending val robot = new Robot val name = robot.name robot.name should be (name) } it ("does not have the same name as other robots") { pending new Robot().name should not be (new Robot().name) } it ("can have its name reset") { pending val robot = new Robot val name = robot.name robot.reset() val name2 = robot.name name should not equal (name2) name2 should fullyMatch regex (nameRegex) } }
Version data entries
41 entries across 41 versions & 1 rubygems