Does anyone know how you can indicate an active support notification? The following does not work. It detects notifications about the basics of rails by default, but not my custom one.
it 'sends a "product.search" notification to any subscribers listening' ActiveSupport::Notifications.should_receive(:instrument).with("product.search", :search => search) get :search, ... end
If I change the specification to check the result of the subscriberβs code (for example, changing the number of records when creating a database record), it passes. This confirms that it is working properly. But it seems wrong to specify what the subscriber is doing here, I just want to indicate that a notification is being sent. Any thoughts would be appreciated.
EDIT:
Here is the controller code I'm trying to specify:
ActiveSupport::Notifications.instrument("product.search", :search => 'test')
source share