Packages

c

org.scalatest.words

IncludeWord

final class IncludeWord extends AnyRef

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Source
IncludeWord.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IncludeWord
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IncludeWord()

Value Members

  1. def apply(expectedSubstring: String): Matcher[String]

    This method enables the following syntax:

    This method enables the following syntax:

    "1.7" should (include ("1.7") and include ("1.8"))
                          ^
    

  2. def regex(expectedRegex: Regex): Matcher[String]

    This method enables the following syntax:

    This method enables the following syntax:

    val decimalRegex = """(-)?(\d+)(\.\d*)?""".r
    "a1.7" should (include regex (decimalRegex) and include regex (decimalRegex))
                           ^
    

  3. def regex(regexWithGroups: RegexWithGroups): Matcher[String]

    This method enables the following syntax:

    This method enables the following syntax:

    string should not { include regex ("a(b*)c" withGroup "bb") }
                                ^
    

  4. def regex[T <: String](right: T): Matcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    val decimal = """(-)?(\d+)(\.\d*)?"""
    "a1.7b" should (include regex (decimal) and include regex (decimal))
                            ^
    

  5. def toString(): String

    Overrides toString to return "include"

    Overrides toString to return "include"

    Definition Classes
    IncludeWord → AnyRef → Any