diff --git a/test/misc.jl b/test/misc.jl index 13d18186e..e36c71f7d 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -8,11 +8,11 @@ using MixedModels: dataset @test MixedModel(@formula(yield ~ 0 + (1|batch)), dyestuff) isa LinearMixedModel @test MixedModel(@formula(yield ~ 1 + (1|batch)), dyestuff) isa LinearMixedModel - @test_throws r"Formula contains no random effects" MixedModel(@formula(yield ~ 0 + batch), dyestuff) - @test_throws r"Formula contains no random effects" MixedModel(@formula(yield ~ 1), dyestuff) + @test_throws MixedModels._MISSING_RE_ERROR MixedModel(@formula(yield ~ 0 + batch), dyestuff) + @test_throws MixedModels._MISSING_RE_ERROR MixedModel(@formula(yield ~ 1), dyestuff) @test MixedModel(@formula(yield ~ 0 + (1|batch)), dyestuff, Poisson()) isa GeneralizedLinearMixedModel @test MixedModel(@formula(yield ~ 1 + (1|batch)), dyestuff, Poisson()) isa GeneralizedLinearMixedModel - @test_throws r"Formula contains no random effects" MixedModel(@formula(yield ~ 0 + batch), dyestuff, Poisson()) - @test_throws r"Formula contains no random effects" MixedModel(@formula(yield ~ 1), dyestuff, Poisson()) + @test_throws MixedModels._MISSING_RE_ERROR MixedModel(@formula(yield ~ 0 + batch), dyestuff, Poisson()) + @test_throws MixedModels._MISSING_RE_ERROR MixedModel(@formula(yield ~ 1), dyestuff, Poisson()) end