Skip to content

Commit

Permalink
Added test to verificate proper test output decoration
Browse files Browse the repository at this point in the history
  • Loading branch information
rlegendi committed Jun 29, 2012
1 parent 9d312a4 commit 5e17238
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/test/scala/org/scalatest/bridges/ScalaTestBridgeTest.scala
Expand Up @@ -9,7 +9,7 @@ import org.scalatest.events.IndentedText
@WrapWith(classOf[Spec2Runner])
class ScalaTestBridgeTest extends Specification {
"The getIndentedText()" should {
"work properly if picture is disabled" in {
"work properly if decoration is disabled" in {
"not indent text at level 0" in {
ScalaTestBridge.getIndentedText("a", 0, false) must have be_== (IndentedText("a", "a", 0))
}
Expand All @@ -19,13 +19,18 @@ class ScalaTestBridgeTest extends Specification {
}
}

"work properly if picture is enabled" in {
"not indent text at level 0" in {
ScalaTestBridge.getIndentedText("a", 0, true) must have be_== (IndentedText("a", "a", 0))
"work properly if decoration is enabled" in {
"not indent decorated text at level 0" in {
ScalaTestBridge.getIndentedText("a", 0, true) must have be_== (IndentedText("- a", "a", 0))
}

"indent text at level 1" in {
ScalaTestBridge.getIndentedText("a", 1, true) must have be_== (IndentedText(" a", "a", 1))
// No, this is not a copy & paste typo: it shouldn't be indented
"not indent decorated text at level 1" in {
ScalaTestBridge.getIndentedText("a", 1, true) must have be_== (IndentedText("- a", "a", 1))
}

"indent decorated text at level 2" in {
ScalaTestBridge.getIndentedText("a", 2, true) must have be_== (IndentedText(" - a", "a", 2))
}
}
}
Expand Down

0 comments on commit 5e17238

Please sign in to comment.