Sha256: 283a980dc07e895fb89a0de275f1dd0cd31af1027ed5015ae22f7109a0cf317b

Contents?: true

Size: 834 Bytes

Versions: 2

Compression:

Stored size: 834 Bytes

Contents

# Used by Yaks::DefaultPolicy* tests to test various name inference schemes

class SoyMapper ; end
class Bean ; end
class Soy < Bean; end
class Wheat ; end

module MyMappers
  class SoyMapper ; end
  class BeanMapper ; end
end

class SoyCollectionMapper ; end

module Namespace
  module Nested
    class Rye ; end
    class Mung < Bean
      alias inspect to_s # on 1.9 inspect calls to_s
      def to_s
        "mungbean"
      end
    end
  end

  class RyeMapper ; end
  class RyeCollectionMapper ; end

  class CollectionMapper ; end

  class ShoeMapper ; end
end

module DislikesCollectionMapper
  def self.const_get(const)
    raise "not a NameError" if const.to_s == 'CollectionMapper'
  end
end

module DislikesOtherMappers
  def self.const_get(const)
    raise "not a NameError" if const.to_s != 'CollectionMapper'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yaks-0.9.0 spec/support/classes_for_policy_testing.rb
yaks-0.8.3 spec/support/classes_for_policy_testing.rb