package net.ceedubs.ficus
package readers

import com.typesafe.config.ConfigFactory

class ConfigReaderSpec extends Spec with ConfigReader with AnyValReaders { def is =
  "The Config value reader should" ^
    "read a config" ! readConfig

  def readConfig = prop { i: Int =>
    val cfg = ConfigFactory.parseString(
      s"""
        |myConfig {
        |  myValue = $i
        |}
      """.stripMargin)
    configValueReader.read(cfg, "myConfig").getInt("myValue") must beEqualTo(i)
  }
}

package net.ceedubs.ficus
package readers

import com.typesafe.config.ConfigFactory

class ConfigReaderSpec extends Spec with ConfigReader with AnyValReaders { def is =
  "The Config value reader should" ^
    "read a config" ! readConfig

  def readConfig = {
    val cfg = ConfigFactory.parseString(
      """
        |myConfig {
        |  myValue = true
        |}
      """.stripMargin)
    configValueReader.read(cfg, "myConfig").getBoolean("myValue") must beTrue
  }
}

--- 
+++ 
@@ -7,13 +7,13 @@
   "The Config value reader should" ^
     "read a config" ! readConfig
 
-  def readConfig = {
+  def readConfig = prop { i: Int =>
     val cfg = ConfigFactory.parseString(
-      """
+      s"""
         |myConfig {
-        |  myValue = true
+        |  myValue = $i
         |}
       """.stripMargin)
-    configValueReader.read(cfg, "myConfig").getBoolean("myValue") must beTrue
+    configValueReader.read(cfg, "myConfig").getInt("myValue") must beEqualTo(i)
   }
 }
Use ScalaCheck for config reader spec
