diff --git a/R/AllClasses.R b/R/AllClasses.R index a4426429..7b884789 100644 --- a/R/AllClasses.R +++ b/R/AllClasses.R @@ -284,7 +284,7 @@ setMethod( FUN = "[[", FUN.VALUE = character(1), i = "name" - )) + ), sep = "_") names(spc_list) <- spc_ref .Object@.Data <- spc_list diff --git a/tests/testthat/test-calibrate.R b/tests/testthat/test-calibrate.R index 99faca60..5022c47a 100644 --- a/tests/testthat/test-calibrate.R +++ b/tests/testthat/test-calibrate.R @@ -51,7 +51,7 @@ test_that("Calibrate a GammaSpectrum object with a PeakPosition object", { ) expect_error(calibrate_energy(spectrum, lines = peaks), - "You must set the corresponding energy") + "You have to provide at least 3 lines for calibration, not 0.") set_energy(peaks) <- c(238, 1461, 2614.5) calib <- calibrate_energy(spectrum, lines = peaks)