Sha256: 85a028790371ea228dba26a39131b3551f714f025e045317503f33e76c56fed7

Contents?: true

Size: 692 Bytes

Versions: 1

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
dispatch-rider-2.2.0 spec/lib/dispatch-rider/handlers/inheritance_tracking_spec.rb