#------------------stan_params()------------------------------------------------ test_that("stan_params() returns the expected string", { prior <- list(sd_prior("par_beta", "lognormal", c(0, 1)), sd_prior("par_rho", "beta", c(2, 2)), sd_prior("I0", "lognormal", c(0, 1), "init")) actual <- stan_params(prior) expected <- paste( "parameters {", " real par_beta;", " real par_rho;", " real I0;", "}", sep = "\n") expect_equal(actual, expected) })