Browse Source

some basic tests, LICENSE file and updated travis config

tags/0.8.0
boB Rudis 7 years ago
parent
commit
f682cdd98f
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 1
      .Rbuildignore
  2. 5
      .travis.yml
  3. 4
      DESCRIPTION
  4. 2
      LICENSE
  5. BIN
      tests/testthat/Rplots.pdf
  6. 24
      tests/testthat/test-hrbrthemes.R

1
.Rbuildignore

@ -10,3 +10,4 @@
^README_files$
^notes$
^cran-comments\.md$
^README_figs$

5
.travis.yml

@ -1,10 +1,15 @@
language: r
warnings_are_errors: true
cache: packages
sudo: required
r:
- oldrel
- release
- devel
env:
global:

4
DESCRIPTION

@ -5,14 +5,14 @@ Version: 0.1.0
Date: 2017-02-11
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre")),
person("Google", "Fonts", comment = "Roboto Condensed Font", role = c("cph"))
person("Google", comment = "Roboto Condensed Font", role = c("cph"))
)
Maintainer: Bob Rudis <bob@rud.is>
Description: A compilation of extra themes and theme components for 'ggplot2'
with an emphasis on typography.
URL: http://github.com/hrbrmstr/hrbrthemes
BugReports: https://github.com/hrbrmstr/hrbrthemes/issues
License: MIT
License: MIT + file LICENSE
Suggests:
testthat,
dplyr,

2
LICENSE

@ -0,0 +1,2 @@
YEAR: 2017
COPYRIGHT HOLDER: Bob Rudis

BIN
tests/testthat/Rplots.pdf

Binary file not shown.

24
tests/testthat/test-hrbrthemes.R

@ -1,6 +1,28 @@
context("basic functionality")
test_that("we can do something", {
#expect_that(some_function(), is_a("data.frame"))
tmp_x1 <- scale_x_comma()
tmp_x2 <- scale_x_percent()
tmp_y1 <- scale_y_comma()
tmp_y2 <- scale_y_percent()
fil <- scale_fill_ipsum()
col <- scale_color_ipsum()
gg_tmp <- ggplot2::ggplot() +
ggplot2::labs(x="Thsi", y="This", title="This", subtitle="This", caption="Thsi")
expect_message(gg_check(gg_tmp), "misspelled")
expect_that(tmp_x1$expand, equals(c(0,0)))
expect_that(tmp_x2$expand, equals(c(0,0)))
expect_that(tmp_y1$expand, equals(c(0,0)))
expect_that(tmp_y2$expand, equals(c(0,0)))
expect_that(ipsum_pal()(1), equals("#d18975"))
expect_that(col$palette(1), equals("#d18975"))
expect_that(fil$palette(1), equals("#d18975"))
})

Loading…
Cancel
Save