drapergem / draper

Decorators/View-Models for Rails Applications
MIT License
5.23k stars 527 forks source link

CI: A test MAY fail with NameError: uninitialized constant ActionMailer::Base #898

Open olleolleolle opened 3 years ago

olleolleolle commented 3 years ago

In the test matrix, Ruby 2.5 failed (a lone failure in a build otherwise working) with this error:

  1) Rails::Generators::DecoratorGenerator the generated decorator inheritance with an ApplicationDecorator is expected to contain "class YourModelDecorator < ApplicationDecorator"

     Failure/Error: config.after { ActionMailer::Base.deliveries.clear }

     NameError:
       uninitialized constant ActionMailer::Base

Is there some sort of ordering of tests which trips this up? Randomized with seed 51507