wisper-rspec
wisper-rspec copied to clipboard
undefined local variable or method `publisher'
I can't figure out how to get past this error. I've followed the instructions but I keep getting the error "undefined local variable or method `publisher'" whenever I run my specs.
I've added the following to my spec_helper.rb
RSpec::configure do |config|
config.include(Wisper::RSpec::BroadcastMatcher)
end
In my test I've written a test like this
it "should broadcast a message for each integration type" do
expect { publisher.execute }.to broadcast(:facebook_pixel_subscriber_created)
SubscriberSubscriber.new.perform(@input_message)
end
I always get the error as shown here

Any ideas?
I think publisher must be a class instance variable belongs to your publisher class.
This doesn't look to be related to wisper-rspec.