I am upgrading an existing app and have a lib/ module that is included in various controllers. Some of the methods in the module set flash.notice when they encounter an error.
How do I expose that method in my spec? Right now all I get is:
undefined local variable or method `flash' for #<RSpec::Core::ExampleGroup::Nested_1:0x00000004084b08>
I’ve tried including various Rails modules (e.g., ActionDispatch) as well defining it myself in the spec, none of which work.