tests/testthat/test_get_specifications.R

context("get_specifications")
specs_1 <- get_specifications("test_file_1.txt")
test_that("get_specifications() returns the correct specifications", {
  expect_equal(specs_1[["title"]], "Test file 1")
  expect_equal(specs_1[["n_directions"]], 20)
  expect_equal(specs_1[["width"]], 25)
  expect_equal(specs_1[["height"]], 15)
  expect_equal(specs_1[["left_right"]], 0.3)
  expect_equal(specs_1[["right_left"]], 0.2)
  expect_equal(specs_1[["up_down"]], 0.2)
  expect_equal(specs_1[["down_up"]], 0.2)
  expect_equal(specs_1[["up_right"]], 0.1)
  expect_equal(specs_1[["up_left"]], 0.1)
  expect_equal(specs_1[["down_right"]], 0.1)
  expect_equal(specs_1[["down_left"]], 0.1)
})
rmsharp/wordPuzzle documentation built on May 26, 2019, 10:36 a.m.