Skip to content

Commit

Permalink
Minor formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leifeld committed Jun 17, 2020
1 parent e86c8d0 commit fafb343
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: texreg
Version: 1.37.5
Date: 2020-06-16
Date: 2020-06-17
Title: Conversion of R Regression Output to LaTeX or HTML Tables
Authors@R: c(person(given = "Philip", family = "Leifeld", email = "philip.leifeld@essex.ac.uk", role = c("aut", "cre")),
person(given = "Claudia", family = "Zucca", email = "claudia.zucca@glasgow.ac.uk", role = "ctb"))
Expand Down
12 changes: 6 additions & 6 deletions tests/testthat/test-texreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,6 @@ test_that("arguments work in screenreg function", {
"\\n Petal\\.Width")
})

## formatting table to test word output in knitreg
mr <- matrixreg(model1, output.type = "ascii", include.attributes = FALSE, trim = TRUE)
colnames(mr) <- mr[1, ]
mr <- mr[-1, ]

test_that("knitreg function works", {
with_mock(requireNamespace = function (package, ...) {
ifelse(package == "knitr", return(FALSE), return(TRUE))
Expand All @@ -321,7 +316,7 @@ test_that("knitreg function works", {
require("rmarkdown")
expect_match(knitreg(model1), "Petal.Width")

## the following evaluates that knitreg chooses and outputs the expected format
# the following evaluates that knitreg chooses and outputs the expected format
knitr::opts_knit$set(out.format = "markdown")

with_mock("rmarkdown::all_output_formats" = function (input) {"html_document"},
Expand All @@ -344,6 +339,11 @@ test_that("knitreg function works", {
"knitr::current_input" = function () {NULL},
expect_equivalent(knitreg(model1), texreg(model1, use.packages = FALSE)))

# formatting table to test word output in knitreg
mr <- matrixreg(model1, output.type = "ascii", include.attributes = FALSE, trim = TRUE)
colnames(mr) <- mr[1, ]
mr <- mr[-1, ]

with_mock("rmarkdown::all_output_formats" = function (input) {"word_document"},
"knitr::current_input" = function () {NULL},
expect_equivalent(knitreg(model1), knitr::kable(mr)))
Expand Down

0 comments on commit fafb343

Please sign in to comment.