title: How to TDD the creation of a Random Integer Range in Scala using Regex?
body: <p>The aim is to TDD a Random Integer Range from 1 until 10 in Scala using Regex.</p>
  
  <p><strong>Test</strong></p>
  
  <pre><code>test("randomInteger") {
    assert(NumberSequences.randomInteger(10) === 1|2|3|4|5|6|7|8|9|10)
  }
  </code></pre>
  
  <p><strong>Main</strong></p>
  
  <pre><code>def randomInteger(a: Int) : Int = {
    scala.util.Random.nextInt(a) + 1 
  }
  </code></pre>
  
  <p><strong>Outcome</strong></p>
  
  <pre><code>&gt; test
  [error] 
  numbersequences\scala\NumberSequencesTest.scala:53: 
  value | is not a member of Option[String]
  [error]     assert(NumberSequences.randomInteger(10) === 1|2|3|4|5|6|7|8|9|10)
  [error]                                                   ^
  [error] one error found
  [error] (test:compile) Compilation failed
  [error] Total time: 1 s, completed Jul 29, 2014 8:25:28 PM
  </code></pre>