Browse files

Add testing infrastructre and timeout test

  • Loading branch information...
1 parent 78edb6d commit ecc398da5ff86f1f1d5ac695e11eb90c8426d9b9 @hadley committed Mar 30, 2012
Showing with 9 additions and 1 deletion.
  1. +2 −1 DESCRIPTION
  2. +5 −0 inst/tests/test-config.r
  3. +2 −0 tests/test-all.R
View
3 DESCRIPTION
@@ -13,7 +13,8 @@ Depends:
stringr
Suggests:
rjson,
- XML
+ XML,
+ testthat
License: MIT
Collate:
'authenticate.r'
View
5 inst/tests/test-config.r
@@ -0,0 +1,5 @@
+context("Config")
+
+test_that("timeout enforce", {
+ expect_error(GET("http://httpbin.org/delay/1", timeout(0.5)), "timed out")
+})
View
2 tests/test-all.R
@@ -0,0 +1,2 @@
+library(testthat)
+test_package("httr")

0 comments on commit ecc398d

Please sign in to comment.