Permalink
Browse files

Added test to verificate proper test output decoration

  • Loading branch information...
1 parent 9d312a4 commit 5e17238910368dcc72caf425dccf4265d62975a9 @rlegendi committed Jun 29, 2012
Showing with 11 additions and 6 deletions.
  1. +11 −6 src/test/scala/org/scalatest/bridges/ScalaTestBridgeTest.scala
@@ -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))
}
@@ -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))
}
}
}

0 comments on commit 5e17238

Please sign in to comment.