Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
fixes to tests, and rproj settings, forgot an xml2 fxn import
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jul 30, 2015
1 parent bb64c63 commit 34c0920
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -73,6 +73,7 @@ importFrom(utils,browseURL)
importFrom(utils,head)
importFrom(xml2,read_html)
importFrom(xml2,read_xml)
importFrom(xml2,xml_attr)
importFrom(xml2,xml_contents)
importFrom(xml2,xml_find_all)
importFrom(xml2,xml_find_one)
Expand Down
2 changes: 1 addition & 1 deletion R/fulltext-package.R
Expand Up @@ -27,7 +27,7 @@
#' @importFrom utils URLdecode browseURL head
#' @importFrom methods is
#' @importFrom stats na.omit setNames
#' @importFrom xml2 read_html read_xml xml_find_one xml_find_all xml_text xml_contents
#' @importFrom xml2 read_html read_xml xml_find_one xml_find_all xml_text xml_contents xml_attr
#' @name fulltext-package
#' @aliases fulltext
#' @docType package
Expand Down
1 change: 1 addition & 0 deletions fulltext.Rproj
Expand Up @@ -17,3 +17,4 @@ AutoAppendNewline: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
2 changes: 1 addition & 1 deletion tests/testthat/test-chunks.R
Expand Up @@ -7,7 +7,7 @@ test_that("chunks returns...", {
(dois <- searchplos(q="*:*", fl='id',
fq=list('doc_type:full',"article_type:\"research article\""), limit=5)$data$id)
x <- ft_get(dois, from="plos")

aa <- x %>% chunks("front")
bb <- x %>% chunks("body")

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-ft_serialize.R
Expand Up @@ -61,8 +61,8 @@ test_that("ft_serialize fails well", {

# bad path given
expect_error(ft_serialize(), "\"x\" is missing")
expect_error(ft_serialize('adfafsdf'), "Input to x must be of class ft_data")
expect_error(ft_serialize(5), "Input to x must be of class ft_data")
expect_error(ft_serialize(mtcars), "Input to x must be of class ft_data")
expect_error(ft_serialize('adfafsdf'), "Input to x must be one of")
expect_error(ft_serialize(5), "Input to x must be one of")
expect_error(ft_serialize(mtcars), "Input to x must be one of")
expect_error(ft_serialize(res, "nada"), "'arg' should be one of")
})

0 comments on commit 34c0920

Please sign in to comment.