Sha256: 7d88c10c94d2ec4a513fffe00f05faffe7a70bd9dee24f331e6d5b415f65d541

Contents?: true

Size: 333 Bytes

Versions: 6

Compression:

Stored size: 333 Bytes

Contents

RSpec::Matchers.define :be_subclass_of do |super_class|
  match do |child_class|
    child_class.superclass == super_class
  end

  failure_message do |child_class|
    "expected the #{child_class} class to be a subclass of #{super_class}"
  end

  description do
    "expected a class to be a subclass of #{super_class}."
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
captain_hoog-2.0.0 spec/support/matchers/be_subclass_of.rb
captain_hoog-1.1.1 spec/support/matchers/be_subclass_of.rb
captain_hoog-1.1.0 spec/support/matchers/be_subclass_of.rb
captain_hoog-1.0.2 spec/support/matchers/be_subclass_of.rb
captain_hoog-1.0.1 spec/support/matchers/be_subclass_of.rb
captain_hoog-1.0 spec/support/matchers/be_subclass_of.rb