BDD backgrounds provide context and pre-existing conditions for features and scenarios.
Arguments
- title
Background title
- given
Preconditions for scenario/feature.
- ...
additional
and
arguments for initial context (provided in alist()
)
Value
A BDD background (based on Gherkin syntax)
Examples
background(title = "Launching the application",
given = "I have launched the application")
#> Background: Launching the application
#> Given I have launched the application
background(title = "Launching the application",
given = "I have launched the application",
and = "it contains movie review data from IMDB and Rotten Tomatoes")
#> Background: Launching the application
#> Given I have launched the application
#> And it contains movie review data from IMDB and Rotten Tomatoes
background(title = "Launching the application",
given = "I have launched the application",
and = list("it contains movie review data from IMDB and Rotten Tomatoes",
"the data contains variables like 'Critics Score' and 'MPAA'",
"the data contains variables like 'Audience Score' and 'Genre'"))
#> Background: Launching the application
#> Given I have launched the application
#> And it contains movie review data from IMDB and Rotten Tomatoes
#> And the data contains variables like 'Critics Score' and 'MPAA'
#> And the data contains variables like 'Audience Score' and 'Genre'
#>