Browse Source

some basic tests, LICENSE file and updated travis config

tags/0.8.0
boB Rudis 4 years ago
parent
commit
f682cdd98f
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
6 changed files with 33 additions and 3 deletions
  1. +1
    -0
      .Rbuildignore
  2. +5
    -0
      .travis.yml
  3. +2
    -2
      DESCRIPTION
  4. +2
    -0
      LICENSE
  5. BIN
      tests/testthat/Rplots.pdf
  6. +23
    -1
      tests/testthat/test-hrbrthemes.R

+ 1
- 0
.Rbuildignore View File

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

+ 5
- 0
.travis.yml View File

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


+ 2
- 2
DESCRIPTION View File

@ -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
- 0
LICENSE View File

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

BIN
tests/testthat/Rplots.pdf View File


+ 23
- 1
tests/testthat/test-hrbrthemes.R View File

@ -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