Sha256: 12613f33ecb2f1c5e8465c8971691b6b809c4652cf044393cfb648d66caeb006

Contents?: true

Size: 661 Bytes

Versions: 16

Compression:

Stored size: 661 Bytes

Contents

require 'spec_helper'

describe DispatchRider::Handlers::InheritanceTracking do
  class InheritanceDummyClass
    extend DispatchRider::Handlers::InheritanceTracking
  end

  describe ".subclasses" do
    context "when a class inherits from the dummy class" do
      class Blah < InheritanceDummyClass
      end

      example do
        expect(InheritanceDummyClass.subclasses).to include(Blah)
      end

      context "and another class inherits from the dummy class" do
        class Foo < InheritanceDummyClass
        end

        example do
          expect(InheritanceDummyClass.subclasses).to include(Blah, Foo)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dispatch-rider-2.1.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-2.0.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.9.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.6 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.5 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.4 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.3 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.2 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.1 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.8.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.7.2 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.7.1 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.7.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.6.2 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.6.1 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb
dispatch-rider-1.6.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb