File: test-Persisters.R

package info (click to toggle)
r-cran-vcr 0.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 596 kB
  • sloc: sh: 13; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
context("Persisters")

test_that("Persisters", {
  expect_is(Persisters, "R6ClassGenerator")
  cl <- Persisters$new()
  expect_is(cl,  "R6")
  expect_is(cl,  "Persisters")

  fs <- cl$persisters$new()
  expect_is(fs, "FileSystem")
})

test_that("Persisters fails well", {
  expect_error(Persisters$new(a = 5), "unused argument")
  expect_error(Persisters$new(name = "foobar"),
          "The requested VCR cassette persister \\(foobar\\) is not registered")
})