% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vignette.R
\name{change_state}
\alias{change_state}
\title{Handle a change of server state}
\usage{
change_state()
}
\value{
Invisibly, the return of \code{.mockPaths()} with the new path added.
}
\description{
In a vignette, put a call to \code{change_state()} before any code block that
makes a change on
the server, or rather, before any code block that might repeat the same
request previously done and expect a different result.
}
\details{
\code{change_state()} works by layering a new directory on top of the existing
\code{\link[=.mockPaths]{.mockPaths()}}, so fixtures are recorded/loaded there, masking rather than
overwriting previously recorded responses for the same request. In
vignettes, these mock layers are subdirectories with integer names.
}
\seealso{
\code{\link[=start_vignette]{start_vignette()}};
\code{vignette("vignettes", package = "httptest2")} for an overview of all
}
