Sha256: 48632ea5db9bb2f0d0037a4ece67c6f0e76ee539ce7b0940bec423897e2ef7dc

Contents?: true

Size: 1019 Bytes

Versions: 51

Compression:

Stored size: 1019 Bytes

Contents

require 'spec_helper'
require 'flydata-core/event/flydata_event_handler_registry'
require 'event/shared_event'


module FlydataCore
  module Event
    describe FlydataEventHandlerRegistry do

      describe "#handlers" do
        context "with event that has specific handlers" do
          it "it returns correct hanlders" do
            handlers = FlydataEventHandlerRegistry.handlers("test", "testing")
            expect(handlers.size).to eql(2)
          end
        end
        context "with event that has specific handlers" do
          it "it returns correct hanlders case-1" do
            handlers = FlydataEventHandlerRegistry.handlers("test2", "testing")
            expect(handlers.size).to eql(2)
          end
          it "it returns any hanlders for unknown verb" do
            handlers = FlydataEventHandlerRegistry.handlers("test2", "abcd")
            expect(handlers.size).to eql(1)
            expect(handlers.to_a()[0]).to be(AnyHandler)
          end
        end

      end

    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
flydata-0.6.8 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.7 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.6 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.5 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.4 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.3 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.2 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.1 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.6.0 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.5.21 flydata-core/spec/event/flydata_event_handler_registry_spec.rb
flydata-0.5.20 flydata-core/spec/event/flydata_event_handler_registry_spec.rb