diff --git a/DESCRIPTION b/DESCRIPTION index c2d0522..4eb11f2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: tvthemes Title: TV Show Themes and Color Palettes for 'ggplot2' Graphics -Version: 1.2.0 +Version: 1.1.1 Authors@R: person(given = "Ryo", family = "Nakagawara", diff --git a/NEWS.md b/NEWS.md index c02ac52..fd7b22e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,9 @@ -# tvthemes 1.2.0 +# tvthemes 1.1.1 * Add Github Actions * R-CMD-Check, codecov, build pkgdown +* Add license for 'Some Time Later' font +* Fix tests, re: check environment # tvthemes 1.1.0 diff --git a/tests/testthat/test-attackontitan.R b/tests/testthat/test-attackontitan.R index 15ae34f..3150e46 100644 --- a/tests/testthat/test-attackontitan.R +++ b/tests/testthat/test-attackontitan.R @@ -1,5 +1,7 @@ context("test-attackontitan") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + ## Attack on Titan test_that("attackOnTitan_pal raises warning with large number, x > 8", { expect_warning(attackOnTitan_pal()(9)) @@ -8,7 +10,7 @@ test_that("attackOnTitan_pal raises warning with large number, x > 8", { }) test_that("scale_colour_attackOnTitan equals scale_color_attackOnTitan", { - expect_equal(scale_color_attackOnTitan(), scale_colour_attackOnTitan()) + expect_eqNe(scale_color_attackOnTitan(), scale_colour_attackOnTitan()) }) test_that("scale_colour_attackOnTitan works", { diff --git a/tests/testthat/test-bighero6.R b/tests/testthat/test-bighero6.R index b4cb2e8..27cb2a2 100644 --- a/tests/testthat/test-bighero6.R +++ b/tests/testthat/test-bighero6.R @@ -1,5 +1,7 @@ context("test-bighero6") +expect_eqNe <- function(...) expect_equal(..., check.environment=FALSE) + ## Big Hero 6 test_that("bigHero6_pal raises warning with large number, x > 8", { expect_warning(bigHero6_pal()(9)) @@ -8,7 +10,7 @@ test_that("bigHero6_pal raises warning with large number, x > 8", { }) test_that("scale_colour_bigHero6 equals scale_color_bigHero6", { - expect_equal(scale_color_bigHero6(), scale_colour_bigHero6()) + expect_eqNe(scale_color_bigHero6(), scale_colour_bigHero6()) }) test_that("scale_color_bigHero6 name is correct", { diff --git a/tests/testthat/test-brooklyn99.R b/tests/testthat/test-brooklyn99.R index 114e401..ed8553b 100644 --- a/tests/testthat/test-brooklyn99.R +++ b/tests/testthat/test-brooklyn99.R @@ -1,5 +1,7 @@ context("test-brooklyn99") +expect_eqNe <- function(...) expect_equal(..., check.environment=FALSE) + test_that("theme_brooklyn99 works", { thm <- theme_brooklyn99() expect_s3_class(thm, "theme") @@ -62,8 +64,8 @@ test_that("brooklyn99_pal raises warning with large number, x > 10", { }) test_that("scale_colour_brooklyn99/dark equals scale_color_brooklyn99/dark", { - expect_equal(scale_color_brooklyn99(palette = "Regular"), scale_colour_brooklyn99(palette = "Regular")) - expect_equal(scale_color_brooklyn99(palette = "Dark"), scale_colour_brooklyn99(palette = "Dark")) + expect_eqNe(scale_color_brooklyn99(palette = "Regular"), scale_colour_brooklyn99(palette = "Regular")) + expect_eqNe(scale_color_brooklyn99(palette = "Dark"), scale_colour_brooklyn99(palette = "Dark")) }) test_that("scale_colour_brooklyn99/dark works", { diff --git a/tests/testthat/test-gameofthrones.R b/tests/testthat/test-gameofthrones.R index cb7e3a1..91e5e7f 100644 --- a/tests/testthat/test-gameofthrones.R +++ b/tests/testthat/test-gameofthrones.R @@ -1,5 +1,7 @@ context("test-gameofthrones") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + ## House Stark ---- test_that("stark_pal raises warning with large number, x > 9", { expect_warning(westeros_pal(palette = "Stark")(10)) @@ -8,7 +10,7 @@ test_that("stark_pal raises warning with large number, x > 9", { }) test_that("scale_colour_stark equals scale_color_stark", { - expect_equal(scale_color_westeros(palette = "Stark"), scale_colour_westeros(palette = "Stark")) + expect_eqNe(scale_color_westeros(palette = "Stark"), scale_colour_westeros(palette = "Stark")) }) test_that("scale_colour_stark works", { @@ -25,7 +27,7 @@ test_that("Lannister_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Lannister equals scale_color_Lannister", { - expect_equal(scale_color_westeros(palette = "Lannister"), scale_colour_westeros(palette = "Lannister")) + expect_eqNe(scale_color_westeros(palette = "Lannister"), scale_colour_westeros(palette = "Lannister")) }) test_that("scale_colour_Lannister works", { @@ -42,7 +44,7 @@ test_that("Tyrell_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Tyrell equals scale_color_Tyrell", { - expect_equal(scale_color_westeros(palette = "Tyrell"), scale_colour_westeros(palette = "Tyrell")) + expect_eqNe(scale_color_westeros(palette = "Tyrell"), scale_colour_westeros(palette = "Tyrell")) }) test_that("scale_colour_Tyrell works", { @@ -59,7 +61,7 @@ test_that("Targaryen_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Targaryen equals scale_color_Targaryen", { - expect_equal(scale_color_westeros(palette = "Targaryen"), scale_colour_westeros(palette = "Targaryen")) + expect_eqNe(scale_color_westeros(palette = "Targaryen"), scale_colour_westeros(palette = "Targaryen")) }) test_that("scale_colour_Targaryen works", { @@ -76,7 +78,7 @@ test_that("Tully_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Tully equals scale_color_Tully", { - expect_equal(scale_color_westeros(palette = "Tully"), scale_colour_westeros(palette = "Tully")) + expect_eqNe(scale_color_westeros(palette = "Tully"), scale_colour_westeros(palette = "Tully")) }) test_that("scale_colour_Tully works", { @@ -93,7 +95,7 @@ test_that("Greyjoy_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Greyjoy equals scale_color_Greyjoy", { - expect_equal(scale_color_westeros(palette = "Greyjoy"), scale_colour_westeros(palette = "Greyjoy")) + expect_eqNe(scale_color_westeros(palette = "Greyjoy"), scale_colour_westeros(palette = "Greyjoy")) }) test_that("scale_colour_Greyjoy works", { @@ -110,7 +112,7 @@ test_that("Manderly_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Manderly equals scale_color_Manderly", { - expect_equal(scale_color_westeros(palette = "Manderly"), scale_colour_westeros(palette = "Manderly")) + expect_eqNe(scale_color_westeros(palette = "Manderly"), scale_colour_westeros(palette = "Manderly")) }) test_that("scale_colour_Manderly works", { @@ -127,7 +129,7 @@ test_that("Stannis_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Stannis equals scale_color_Stannis", { - expect_equal(scale_color_westeros(palette = "Stannis"), scale_colour_westeros(palette = "Stannis")) + expect_eqNe(scale_color_westeros(palette = "Stannis"), scale_colour_westeros(palette = "Stannis")) }) test_that("scale_colour_Stannis works", { @@ -144,7 +146,7 @@ test_that("Martell_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Martell equals scale_color_Martell", { - expect_equal(scale_color_westeros(palette = "Martell"), scale_colour_westeros(palette = "Martell")) + expect_eqNe(scale_color_westeros(palette = "Martell"), scale_colour_westeros(palette = "Martell")) }) test_that("scale_colour_Martell works", { @@ -161,7 +163,7 @@ test_that("Arryn_pal raises warning with large number, x > 9", { }) test_that("scale_colour_Arryn equals scale_color_Arryn", { - expect_equal(scale_color_westeros(palette = "Arryn"), scale_colour_westeros(palette = "Arryn")) + expect_eqNe(scale_color_westeros(palette = "Arryn"), scale_colour_westeros(palette = "Arryn")) }) test_that("scale_colour_Arryn works", { diff --git a/tests/testthat/test-gravityfalls.R b/tests/testthat/test-gravityfalls.R index ecdfca5..1de848c 100644 --- a/tests/testthat/test-gravityfalls.R +++ b/tests/testthat/test-gravityfalls.R @@ -1,5 +1,7 @@ context("test-gravityFalls") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + ## Big Hero 6 test_that("gravityFalls_pal raises warning with large number, x > 15", { expect_warning(gravityFalls_pal()(15)) @@ -8,7 +10,7 @@ test_that("gravityFalls_pal raises warning with large number, x > 15", { }) test_that("scale_colour_gravityFalls equals scale_color_gravityFalls", { - expect_equal(scale_color_gravityFalls(), scale_colour_gravityFalls()) + expect_eqNe(scale_color_gravityFalls(), scale_colour_gravityFalls()) }) test_that("scale_color_gravityFalls name is correct", { diff --git a/tests/testthat/test-hilda.R b/tests/testthat/test-hilda.R index 36997ae..8dc26d9 100644 --- a/tests/testthat/test-hilda.R +++ b/tests/testthat/test-hilda.R @@ -1,5 +1,7 @@ context("test-hilda") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + # Hilda Day ---- test_that("theme_hildaDay works", { thm <- theme_hildaDay() @@ -64,7 +66,7 @@ test_that("hilda_pal raises warning with large number, x > 8", { }) test_that("scale_colour_hilda equals scale_color_hilda", { - expect_equal(scale_color_hilda(palette = "Day"), scale_colour_hilda(palette = "Day")) + expect_eqNe(scale_color_hilda(palette = "Day"), scale_colour_hilda(palette = "Day")) }) test_that("scale_colour_hilda works", { @@ -137,7 +139,7 @@ test_that("hilda_pal raises warning with large number, x > 8", { }) test_that("scale_colour_hilda equals scale_color_hilda", { - expect_equal(scale_color_hilda(palette = "Dusk"), scale_colour_hilda(palette = "Dusk")) + expect_eqNe(scale_color_hilda(palette = "Dusk"), scale_colour_hilda(palette = "Dusk")) }) test_that("scale_colour_hilda works", { @@ -210,7 +212,7 @@ test_that("hilda_pal raises warning with large number, x > 8", { }) test_that("scale_colour_hilda equals scale_color_hilda", { - expect_equal(scale_color_hilda(palette = "Night"), scale_colour_hilda(palette = "Night")) + expect_eqNe(scale_color_hilda(palette = "Night"), scale_colour_hilda(palette = "Night")) }) test_that("scale_colour_hilda works", { diff --git a/tests/testthat/test-kimpossible.R b/tests/testthat/test-kimpossible.R index 80848c1..7a50612 100644 --- a/tests/testthat/test-kimpossible.R +++ b/tests/testthat/test-kimpossible.R @@ -1,5 +1,7 @@ context("test-kimpossible") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + ## Kim Possible test_that("kimPossible_pal raises warning with large number, x > 12", { expect_warning(kimPossible_pal()(13)) @@ -8,7 +10,7 @@ test_that("kimPossible_pal raises warning with large number, x > 12", { }) test_that("scale_colour_kimPossible equals scale_color_kimPossible", { - expect_equal(scale_color_kimPossible(), scale_colour_kimPossible()) + expect_eqNe(scale_color_kimPossible(), scale_colour_kimPossible()) }) test_that("scale_color_kimPossible name is correct", { diff --git a/tests/testthat/test-parksandrec.R b/tests/testthat/test-parksandrec.R index 56a0175..1a1359c 100644 --- a/tests/testthat/test-parksandrec.R +++ b/tests/testthat/test-parksandrec.R @@ -1,5 +1,7 @@ context("test-parksandrec") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + test_that("theme_parksAndRec works", { thm <- theme_parksAndRec() expect_s3_class(thm, "theme") @@ -174,7 +176,7 @@ test_that("parksAndRec_pal raises warning with large number, x > 10", { }) test_that("scale_colour_parksAndRec equals scale_color_parksAndRec", { - expect_equal(scale_color_parksAndRec(), scale_colour_parksAndRec()) + expect_eqNe(scale_color_parksAndRec(), scale_colour_parksAndRec()) }) test_that("scale_colour_parksAndRec/light works", { diff --git a/tests/testthat/test-rickandmorty.R b/tests/testthat/test-rickandmorty.R index a759560..3895d66 100644 --- a/tests/testthat/test-rickandmorty.R +++ b/tests/testthat/test-rickandmorty.R @@ -1,5 +1,7 @@ context("test-rickandmorty") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + test_that("theme_rickAndMorty works", { thm <- theme_rickAndMorty() expect_s3_class(thm, "theme") @@ -62,7 +64,7 @@ test_that("rickAndMorty_pal raises warning with large number, x > 9", { }) test_that("scale_colour_rickAndMorty equals scale_color_rickAndMorty", { - expect_equal(scale_color_rickAndMorty(), scale_colour_rickAndMorty()) + expect_eqNe(scale_color_rickAndMorty(), scale_colour_rickAndMorty()) }) test_that("scale_colour_rickAndMorty works", { diff --git a/tests/testthat/test-simpsons.R b/tests/testthat/test-simpsons.R index e7de834..c0a6533 100644 --- a/tests/testthat/test-simpsons.R +++ b/tests/testthat/test-simpsons.R @@ -1,5 +1,7 @@ context("test-simpsons") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + test_that("theme_simpsons works", { thm <- theme_simpsons() expect_s3_class(thm, "theme") @@ -62,7 +64,7 @@ test_that("simpsons_pal raises warning with large number, x > 10", { }) test_that("scale_colour_simpsons equals scale_color_simpsons", { - expect_equal(scale_color_simpsons(), scale_colour_simpsons()) + expect_eqNe(scale_color_simpsons(), scale_colour_simpsons()) }) test_that("scale_colour_simpsons works", { diff --git a/tests/testthat/test-spongebob.R b/tests/testthat/test-spongebob.R index c7d1311..7cc548f 100644 --- a/tests/testthat/test-spongebob.R +++ b/tests/testthat/test-spongebob.R @@ -1,5 +1,7 @@ context("test-spongebob") +expect_eqNe <- function(...) expect_equal(..., check.environment = FALSE) + test_that("theme_spongeBob works", { thm <- theme_spongeBob() expect_s3_class(thm, "theme") @@ -62,7 +64,7 @@ test_that("spongeBob_pal raises warning with large number, x > 9", { }) test_that("scale_colour_spongeBob equals scale_color_spongeBob", { - expect_equal(scale_color_spongeBob(), scale_colour_spongeBob()) + expect_eqNe(scale_color_spongeBob(), scale_colour_spongeBob()) }) test_that("scale_colour_spongeBob works", { diff --git a/tests/testthat/test-thelastairbender.R b/tests/testthat/test-thelastairbender.R index ac740d7..9166e00 100644 --- a/tests/testthat/test-thelastairbender.R +++ b/tests/testthat/test-thelastairbender.R @@ -1,5 +1,7 @@ context("test-thelastairbender") +expect_eqNe <- function(...) expect_equal(..., check.environment=FALSE) + test_that("theme_theLastAirbender works", { thm <- theme_theLastAirbender() expect_s3_class(thm, "theme") @@ -122,7 +124,7 @@ test_that("fireNation_pal raises warning with large number, x > 8", { }) test_that("scale_colour_fireNation equals scale_color_fireNation", { - expect_equal(scale_color_avatarTLA(palette = "FireNation"), scale_colour_avatarTLA(palette = "FireNation")) + expect_eqNe(scale_color_avatarTLA(palette = "FireNation"), scale_colour_avatarTLA(palette = "FireNation")) }) test_that("scale_colour_fireNation works", { @@ -139,7 +141,7 @@ test_that("WaterTribe_pal raises warning with large number, x > 8", { }) test_that("scale_colour_WaterTribe equals scale_color_WaterTribe", { - expect_equal(scale_color_avatarTLA(palette = "WaterTribe"), scale_colour_avatarTLA(palette = "WaterTribe")) + expect_eqNe(scale_color_avatarTLA(palette = "WaterTribe"), scale_colour_avatarTLA(palette = "WaterTribe")) }) test_that("scale_colour_WaterTribe works", { @@ -156,7 +158,7 @@ test_that("EarthKingdom_pal raises warning with large number, x > 9", { }) test_that("scale_colour_EarthKingdom equals scale_color_EarthKingdom", { - expect_equal(scale_color_avatarTLA(palette = "EarthKingdom"), scale_colour_avatarTLA(palette = "EarthKingdom")) + expect_eqNe(scale_color_avatarTLA(palette = "EarthKingdom"), scale_colour_avatarTLA(palette = "EarthKingdom")) }) test_that("scale_colour_EarthKingdom works", { @@ -173,7 +175,7 @@ test_that("AirNomads_pal raises warning with large number, x > 8", { }) test_that("scale_colour_AirNomads equals scale_color_AirNomads", { - expect_equal(scale_color_avatarTLA(palette = "AirNomads"), scale_colour_avatarTLA(palette = "AirNomads")) + expect_eqNe(scale_color_avatarTLA(palette = "AirNomads"), scale_colour_avatarTLA(palette = "AirNomads")) }) test_that("scale_colour_AirNomads works", { @@ -264,7 +266,7 @@ test_that("fireNation_pal raises warning with large number, x > 8", { }) test_that("scale_colour_fireNation equals scale_color_fireNation", { - expect_equal(scale_color_avatar(palette = "FireNation"), scale_colour_avatar(palette = "FireNation")) + expect_eqNe(scale_color_avatar(palette = "FireNation"), scale_colour_avatar(palette = "FireNation")) }) test_that("scale_colour_fireNation works", { @@ -281,7 +283,7 @@ test_that("WaterTribe_pal raises warning with large number, x > 8", { }) test_that("scale_colour_WaterTribe equals scale_color_WaterTribe", { - expect_equal(scale_color_avatar(palette = "WaterTribe"), scale_colour_avatar(palette = "WaterTribe")) + expect_eqNe(scale_color_avatar(palette = "WaterTribe"), scale_colour_avatar(palette = "WaterTribe")) }) test_that("scale_colour_WaterTribe works", { @@ -298,7 +300,7 @@ test_that("EarthKingdom_pal raises warning with large number, x > 9", { }) test_that("scale_colour_EarthKingdom equals scale_color_EarthKingdom", { - expect_equal(scale_color_avatar(palette = "EarthKingdom"), scale_colour_avatar(palette = "EarthKingdom")) + expect_eqNe(scale_color_avatar(palette = "EarthKingdom"), scale_colour_avatar(palette = "EarthKingdom")) }) test_that("scale_colour_EarthKingdom works", { @@ -315,7 +317,7 @@ test_that("AirNomads_pal raises warning with large number, x > 8", { }) test_that("scale_colour_AirNomads equals scale_color_AirNomads", { - expect_equal(scale_color_avatar(palette = "AirNomads"), scale_colour_avatar(palette = "AirNomads")) + expect_eqNe(scale_color_avatar(palette = "AirNomads"), scale_colour_avatar(palette = "AirNomads")) }) test_that("scale_colour_AirNomads works", {