Skip to content

Commit

Permalink
Test that a tundraContainer cannot be trained twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertzk committed Aug 2, 2015
1 parent 9343371 commit 091a6c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-train.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
context("tundraContainer$train")

describe("Invalid inputs", {
test_that("it cannot be trained twice", {
container <- tundraContainer$new("foo")
container$train(iris)
expect_error(container$train(iris), "has already been trained")
})
})

test_that("it can train a simple example", {
container <- tundraContainer$new("foo", function(data) {
output$data <- data
Expand Down

0 comments on commit 091a6c4

Please sign in to comment.