Skip to content

Commit

Permalink
Span safety net for test during development
Browse files Browse the repository at this point in the history
  • Loading branch information
Zack-83 committed Jul 12, 2018
1 parent c9fa0de commit 68f0833
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Suggests: covr
Suggests:
covr,
testthat (>= 2.0.0)
Imports:
dplyr (>= 0.7.6)
4 changes: 4 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
library(testthat)
library(maRgheRitaR)

test_check("maRgheRitaR")
5 changes: 5 additions & 0 deletions tests/testthat/test-center.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
context("test-center.R")

test_that("centering works", {
expect_equal(center(c(1,2,3),0), c(-1,0,1))
})
5 changes: 5 additions & 0 deletions tests/testthat/test-rescale.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
context("test-rescale.R")

test_that("rescaling works", {
expect_equal(rescale(1:5), 0.25*(0:4))
})

0 comments on commit 68f0833

Please sign in to comment.