Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalatest

    ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

    ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

    Definition Classes
    org
  • package compatible
    Definition Classes
    scalatest
  • package concurrent

    Classes, traits, and objects related to testing asynchronous and multi-threaded behavior.

    Classes, traits, and objects related to testing asynchronous and multi-threaded behavior.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package diagrams

    A single traits and companion object that provides a assertions that draw code diagrams on failure.

    A single traits and companion object that provides a assertions that draw code diagrams on failure.

    This package is released as the scalatest-diagrams module.

    Definition Classes
    scalatest
  • package enablers

    Classes, traits, and objects for typeclasses that enable ScalaTest's DSLs.

    Classes, traits, and objects for typeclasses that enable ScalaTest's DSLs.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package events

    Classes for events sent to the org.scalatest.Reporter to report the results of running tests.

    Classes for events sent to the org.scalatest.Reporter to report the results of running tests.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package exceptions

    Classes and traits for exceptions thrown by ScalaTest.

    Classes and traits for exceptions thrown by ScalaTest.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package featurespec

    Classes and traits for ScalaTest's FeatureSpec style.

    Classes and traits for ScalaTest's FeatureSpec style.

    This package is released as the scalatest-featurespec module.

    Definition Classes
    scalatest
  • package fixture

    Classes and traits supporting ScalaTest's "fixture" style traits, which allow you to pass fixture objects into tests.

    Classes and traits supporting ScalaTest's "fixture" style traits, which allow you to pass fixture objects into tests.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package flatspec

    Classes and traits for ScalaTest's FlatSpec style.

    Classes and traits for ScalaTest's FlatSpec style.

    This package is released as the scalatest-flatspec module.

    Definition Classes
    scalatest
  • package freespec

    Classes and traits for ScalaTest's FreeSpec style.

    Classes and traits for ScalaTest's FreeSpec style.

    This package is released as the scalatest-freespec module.

    Definition Classes
    scalatest
  • package funspec

    Classes and traits for ScalaTest's FunSpec style.

    Classes and traits for ScalaTest's FunSpec style.

    This package is released as the scalatest-funspec module.

    Definition Classes
    scalatest
  • package funsuite

    Classes and traits for ScalaTest's FunSuite style.

    Classes and traits for ScalaTest's FunSuite style.

    This package is released as the scalatest-funsuite module.

    Definition Classes
    scalatest
  • package matchers

    Classes and traits for matchers.

    Classes and traits for matchers.

    This package is released as part of the scalatest-matchers-core module.

    Definition Classes
    scalatest
  • package path

    ScalaTest's old path package that contains deprecated aliases for path style traits.

    ScalaTest's old path package that contains deprecated aliases for path style traits.

    Definition Classes
    scalatest
  • package prop
    Definition Classes
    scalatest
  • package propspec

    Classes and traits for ScalaTest's PropSpec style.

    Classes and traits for ScalaTest's PropSpec style.

    This package is released as the scalatest-propspec module.

    Definition Classes
    scalatest
  • package refspec

    Classes and traits for ScalaTest's RefSpec style.

    Classes and traits for ScalaTest's RefSpec style.

    This package is released as the scalatest-refspec module.

    Definition Classes
    scalatest
  • package tagobjects

    Singleton-object versions of ScalaTest's built-in tags.

    Singleton-object versions of ScalaTest's built-in tags.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package tags
    Definition Classes
    scalatest
  • package time

    Classes, traits, and objects for ScalaTest's time DSL.

    Classes, traits, and objects for ScalaTest's time DSL.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package tools

    Tools for running ScalaTest.

    Tools for running ScalaTest.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • package verbs

    Classes and traits that support ScalaTest DSLs.

    Classes and traits that support ScalaTest DSLs.

    This package is released as part of the scalatest-core module.

    Definition Classes
    scalatest
  • BehaveWord
  • CanVerb
  • CompileWord
  • MustVerb
  • ResultOfAfterWordApplication
  • ResultOfStringPassedToVerb
  • ResultOfTaggedAsInvocation
  • ShouldVerb
  • StringVerbBehaveLikeInvocation
  • StringVerbBlockRegistration
  • StringVerbStringInvocation
  • SubjectWithAfterWordRegistration
  • TypeCheckWord
  • package words

    A deprecated package that contained support for ScalaTest DSLs.

    A deprecated package that contained support for ScalaTest DSLs.

    Definition Classes
    scalatest
  • package wordspec

    Classes and traits for ScalaTest's WordSpec style.

    Classes and traits for ScalaTest's WordSpec style.

    This package is released as the scalatest-wordspec module.

    Definition Classes
    scalatest

package verbs

Classes and traits that support ScalaTest DSLs.

This package is released as part of the scalatest-core module.

Source
package.scala
Linear Supertypes
AnyRef, Any

Type Members

  1. final class BehaveWord extends AnyRef

    Class that supports shared test registration via instances referenced from the behave field of FunSpecs, FlatSpecs, and WordSpecs as well as instance of their sister traits, fixture.FunSpec, fixture.FlatSpec, and fixture.WordSpec.

    Class that supports shared test registration via instances referenced from the behave field of FunSpecs, FlatSpecs, and WordSpecs as well as instance of their sister traits, fixture.FunSpec, fixture.FlatSpec, and fixture.WordSpec.

    This class, via the behave field, enables syntax such as the following in FunSpecs, FlatSpecs, fixture.FunSpecs, and fixture.FlatSpecs:

    it should behave like nonFullStack(stackWithOneItem)
              ^
    

    It also enables syntax such as the following syntax in WordSpecs and fixture.WordSpecs:

    behave like nonEmptyStack(lastValuePushed)
    ^
    

    For more information and examples of the use of <cod>behave, see the Shared tests section in the main documentation for trait FunSpec, FlatSpec, or WordSpec.

  2. trait CanVerb extends AnyRef

    Provides an implicit conversion that adds can methods to String to support the syntax of FlatSpec, WordSpec, org.scalatest.fixture.FlatSpec, and fixture.WordSpec.

    Provides an implicit conversion that adds can methods to String to support the syntax of FlatSpec, WordSpec, org.scalatest.fixture.FlatSpec, and fixture.WordSpec.

    For example, this trait enables syntax such as the following test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" can "be empty" in { ... }
                           ^
    

    It also enables syntax such as the following shared test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (with one item)" can behave like nonEmptyStack(stackWithOneItem, lastValuePushed)
                              ^
    

    In addition, it supports the registration of subject descriptions in WordSpec and fixture.WordSpec, such as:

    "A Stack (when empty)" can { ...
                           ^
    

    And finally, it also supportds the registration of subject descriptions with after words in WordSpec and fixture.WordSpec. For example:

    def provide = afterWord("provide")
    
    "The ScalaTest Matchers DSL" can provide { ^

    The reason this implicit conversion is provided in a separate trait, instead of being provided directly in FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec, is primarily for design symmetry with ShouldVerb and MustVerb. Both ShouldVerb and MustVerb must exist as a separate trait because an implicit conversion provided directly would conflict with the implicit conversion that provides should or must methods on String in the Matchers and MustMatchers traits.

  3. final class CompileWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

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

  4. trait MustVerb extends AnyRef

    Provides an implicit conversion that adds must methods to String to support the syntax of FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec.

    Provides an implicit conversion that adds must methods to String to support the syntax of FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec.

    For example, this trait enables syntax such as the following test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" must "be empty" in { ... }
                           ^
    

    It also enables syntax such as the following shared test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (with one item)" must behave like nonEmptyStack(stackWithOneItem, lastValuePushed)
                              ^
    

    In addition, it supports the registration of subject descriptions in WordSpec and fixture.WordSpec, such as:

    "A Stack (when empty)" must { ...
                           ^
    

    And finally, it also supportds the registration of subject descriptions with after words in WordSpec and fixture.WordSpec. For example:

    def provide = afterWord("provide")
    
    "The ScalaTest Matchers DSL" must provide { ^

    The reason this implicit conversion is provided in a separate trait, instead of being provided directly in FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec, is because an implicit conversion provided directly would conflict with the implicit conversion that provides must methods on String in the MustMatchers trait. By contrast, there is no conflict with the separate MustVerb trait approach, because:

    • FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec mix in MustVerb directly, and
    • MustMatchers extends MustVerb, overriding the convertToStringMustWrapper implicit conversion function.

    So whether or not a FlatSpec, WordSpec, fixture.FlatSpec, or fixture.WordSpec mixes in MustMatchers, there will only be one implicit conversion in scope that adds must methods to Strings.

    Also, because the class of the result of the overriding convertToStringMustWrapper implicit conversion method provided in MustMatchers extends this trait's StringMustWrapperForVerb class, the four uses of must provided here are still available. These four must are in fact available to any class that mixes in MustMatchers, but each takes an implicit parameter that is provided only in FlatSpec and fixture.FlatSpec, or WordSpec and fixture.WordSpec.

  5. final class ResultOfAfterWordApplication extends AnyRef

    Class that supports the use of after words in WordSpec and fixture.WordSpec.

    Class that supports the use of after words in WordSpec and fixture.WordSpec.

    A ResultOfAfterWordApplication, which encapsulates the text of the after word and a block, is accepted by when, should, must, can, and that methods. For more information, see the main documentation for trait WordSpec.

  6. abstract class ResultOfStringPassedToVerb extends AnyRef

    Abstract class that supports test registration in FlatSpec and fixture.FlatSpec.

    Abstract class that supports test registration in FlatSpec and fixture.FlatSpec.

    For example, this class enables syntax such as the following pending test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" should "be empty" is (pending)
                                             ^
    

    For example, this class enables syntax such as the following tagged test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" should "be empty" taggedAs(SlowTet) in { ... }
                                             ^
    

    This class also indirectly enables syntax such as the following regular test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" should "be empty" in { ... }
                                             ^
    

    However, this class does not declare any methods named in, because the type passed to in differs in a FlatSpec and a fixture.FlatSpec. A fixture.FlatSpec needs two in methods, one that takes a no-arg test function and another that takes a one-arg test function (a test that takes a Fixture as its parameter). By constrast, a FlatSpec needs only one in method that takes a by-name parameter. As a result, FlatSpec and fixture.FlatSpec each provide an implicit conversion from ResultOfStringPassedToVerb to a type that provides the appropriate in methods.

  7. abstract class ResultOfTaggedAsInvocation extends AnyRef

    Supports the registration of tagged tests in shorthand form in FlatSpec and fixture.FlatSpec.

    Supports the registration of tagged tests in shorthand form in FlatSpec and fixture.FlatSpec.

    For example, this class enables syntax such as the following tagged, pending test registration in shorthand form:

    "A Stack (when empty)" should "be empty" taggedAs() is (pending)
                                                        ^
    

    In addition, this class indirectly enables syntax such as the following tagged test registration in shorthand form:

    "A Stack (when empty)" should "be empty" taggedAs() in { ... }
                                                        ^
    

    Rather than provide in and ignore methods directly, these methods are provided after taggedAs() by implicit conversions because the type passed to in (and ignore) differs in a FlatSpec and a fixture.FlatSpec. A fixture.FlatSpec needs two in methods, one that takes a no-arg test function and another that takes a one-arg test function (a test that takes a Fixture as its parameter). By constrast, a FlatSpec needs only one in method that takes a by-name parameter. As a result, FlatSpec and fixture.FlatSpec each provide an implicit conversion from ResultOfTaggedAsInvocation to a type that provides the appropriate in methods.

  8. trait ShouldVerb extends AnyRef

    Provides an implicit conversion that adds should methods to String to support the syntax of FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec.

    Provides an implicit conversion that adds should methods to String to support the syntax of FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec.

    For example, this trait enables syntax such as the following test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" should "be empty" in { ... }
                           ^
    

    It also enables syntax such as the following shared test registration in FlatSpec and fixture.FlatSpec:

    "A Stack (with one item)" should behave like nonEmptyStack(stackWithOneItem, lastValuePushed)
                              ^
    

    In addition, it supports the registration of subject descriptions in WordSpec and fixture.WordSpec, such as:

    "A Stack (when empty)" should { ...
                           ^
    

    And finally, it also supportds the registration of subject descriptions with after words in WordSpec and fixture.WordSpec. For example:

    def provide = afterWord("provide")
    
    "The ScalaTest Matchers DSL" should provide { ^

    The reason this implicit conversion is provided in a separate trait, instead of being provided directly in FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec, is because an implicit conversion provided directly would conflict with the implicit conversion that provides should methods on String in the Matchers trait. By contrast, there is no conflict with the separate ShouldVerb trait approach, because:

    • FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec mix in ShouldVerb directly, and
    • Matchers extends ShouldVerb, overriding the convertToStringShouldWrapper implicit conversion function.

    So whether or not a FlatSpec, WordSpec, fixture.FlatSpec, or fixture.WordSpec mixes in Matchers, there will only be one implicit conversion in scope that adds should methods to Strings.

    Also, because the class of the result of the overriding convertToStringShouldWrapper implicit conversion method provided in Matchers extends this trait's StringShouldWrapperForVerb class, the four uses of should provided here are still available. These four should are in fact available to any class that mixes in Matchers, but each takes an implicit parameter that is provided only in FlatSpec and fixture.FlatSpec, or WordSpec and fixture.WordSpec.

  9. abstract class StringVerbBehaveLikeInvocation extends AnyRef

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in FlatSpec and FreeSpec styles.

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in FlatSpec and FreeSpec styles.

    For example, this class enables syntax such as the following in WordSpec and fixture.WordSpec:

    "A Stack (when empty)" should { ...
                           ^
    

    This should method, which is provided in ShouldVerb, needs an implicit parameter of type StringVerbBlockRegistration.

  10. abstract class StringVerbBlockRegistration extends AnyRef

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in WordSpec and fixture.WordSpec.

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in WordSpec and fixture.WordSpec.

    For example, this class enables syntax such as the following in WordSpec and fixture.WordSpec:

    "A Stack (when empty)" should { ...
                           ^
    

    This should method, which is provided in ShouldVerb, needs an implicit parameter of type StringVerbBlockRegistration.

  11. abstract class StringVerbStringInvocation extends AnyRef

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in FlatSpec and FreeSpec styles.

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in FlatSpec and FreeSpec styles.

    For example, this class enables syntax such as the following in WordSpec and fixture.WordSpec:

    "A Stack (when empty)" should { ...
                           ^
    

    This should method, which is provided in ShouldVerb, needs an implicit parameter of type StringVerbBlockRegistration.

  12. abstract class SubjectWithAfterWordRegistration extends AnyRef

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in FlatSpec and FreeSpec styles.

    Class that provides a role-specific type for an implicit conversion used to support the registration of subject descriptions in FlatSpec and FreeSpec styles.

    For example, this class enables syntax such as the following in WordSpec and fixture.WordSpec:

    "A Stack (when empty)" should { ...
                           ^
    

    This should method, which is provided in ShouldVerb, needs an implicit parameter of type StringVerbBlockRegistration.

  13. final class TypeCheckWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

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

Inherited from AnyRef

Inherited from Any

Ungrouped