does anyone know how to stub out routing constraints or pre-set routing constraints when testing controllers? i have a couple of constraints that do role checks on my users, i just want to stub them to return true or false so i can test the underlying controllers
i tried WorkerRouteConstraint.any_instance.stubs(matches?: true) in my setup method but it didn't seem to do anything
is there a way that i can stub or prevent the rendering of templates in my controller tests?
i have to do some mocking to test control flow in my action and it's messing with the rendered template. i don't care about the template at all in this test and i don't want to deal with it.
does anyone know if there's a way to get a backtrace in sprockets of where a file is being imported or required? i have an error in a CSS file but as far as I know i've removed the @import call for that file
i'm wondering if it's being imported or required somewhere else, possibly out of order, causing the error in the first place
never mind, someone created an initializer and threw this in: Rails.application.config.assets.precompile += [/.*\.js/,/.*\.css/]