diff options
Diffstat (limited to 'crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala')
-rw-r--r-- | crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala b/crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala new file mode 100644 index 0000000..8834af9 --- /dev/null +++ b/crashboxd/src/test/scala/io/crashbox/ci/ParserSpec.scala @@ -0,0 +1,19 @@ +package io.crashbox.ci + +import org.scalatest._ + +class ParserSpec extends FlatSpec with Matchers { + + val build = """|tasks: + | main: + | image: foo/bar + | script: echo "hello world" + |""".stripMargin + + val parsed = BuildDef( + Seq(TaskDef(DockerEnvironment("foo/bar"), "echo \"hello world\""))) + + "Parser" should "parse build definitions" in { + assert(Parser.parse(build) == Parser.Success(parsed)) + } +} |