Sha256: 930eef6ffa3bc7d55d37d808a7206aaf4dfddd2c51cadbad4ba4234231f2a69c

Contents?: true

Size: 483 Bytes

Versions: 19

Compression:

Stored size: 483 Bytes

Contents

module Pancake
  module Matchers
    
    class InheritFrom
      def initialize(expected)
        @expected = expected
      end
      
      def matches?(target)
        @target = target
        @target.ancestors.include?(@expected)
      end
      
      def failure_message
        "expected #{@target} to inherit from #{@expected} but did not"
      end
    end
    
    def inherit_from(expected)
      InheritFrom.new(expected)
    end
    
    
  end # Matchers
end # Pancake

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
hassox-pancake-0.1.6 spec/helpers/matchers.rb
pancake-0.2.0 spec/helpers/matchers.rb
pancake-0.1.29 spec/helpers/matchers.rb
pancake-0.1.28 spec/helpers/matchers.rb
pancake-0.1.27 spec/helpers/matchers.rb
pancake-0.1.26 spec/helpers/matchers.rb
pancake-0.1.25 spec/helpers/matchers.rb
pancake-0.1.24 spec/helpers/matchers.rb
pancake-0.1.22 spec/helpers/matchers.rb
pancake-0.1.20 spec/helpers/matchers.rb
pancake-0.1.19 spec/helpers/matchers.rb
pancake-0.1.18 spec/helpers/matchers.rb
pancake-0.1.17 spec/helpers/matchers.rb
pancake-0.1.16 spec/helpers/matchers.rb
pancake-0.1.15 spec/helpers/matchers.rb
pancake-0.1.13 spec/helpers/matchers.rb
pancake-0.1.12 spec/helpers/matchers.rb
pancake-0.1.10 spec/helpers/matchers.rb
pancake-0.1.8 spec/helpers/matchers.rb