spec/acfs/runner_spec.rb in acfs-0.38.0 vs spec/acfs/runner_spec.rb in acfs-0.39.0

- old
+ new

@@ -35,38 +35,43 @@ describe ::Acfs::Runner do let(:adapter) { ::NullAdapter.new } let(:runner) { ::Acfs::Runner.new adapter } let(:collector) { NotificationCollector.new } + let(:collector2) { NotificationCollector.new } after do ::ActiveSupport::Notifications.notifier = \ ::ActiveSupport::Notifications::Fanout.new end describe '#instrumentation' do before do ::ActiveSupport::Notifications.subscribe /^acfs\.runner/, collector + ::ActiveSupport::Notifications.subscribe /^acfs\.operation/, collector2 end describe '#process' do it 'should trigger event' do runner.process ::Acfs::Operation.new MyUser, :read, params: {id: 0} expect(collector.events).to have(1).items + expect(collector2.events).to have(1).items end end describe '#run' do it 'should trigger event' do runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0} expect(collector.events).to have(1).items + expect(collector2.events).to have(0).items end end describe '#enqueue' do it 'should trigger event' do - runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0} + runner.enqueue ::Acfs::Operation.new MyUser, :read, params: {id: 0} expect(collector.events).to have(1).items + expect(collector2.events).to have(0).items end end end describe '#run' do