Sha256: 5fe4fad99efffda467b6bfd5f91eacba388e5cb1531ca4eded3b72bd74dd7577

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

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

class SoyMapper; end
class Soy; end
class WildSoy < Soy; end

module Grain
  class Soy; end
  class WildSoy < Soy; end

  class Wheat; end
  class Durum < Wheat; end

  module Dry
    class Soy < ::Grain::Soy; end
    class SoyMapper; end
  end

  class SoyMapper; end
  class SoyCollectionMapper; end
end

class HomeMapper; end
class WheatMapper; end
class ObjectMapper; end
class BasicObjectMapper; end

module MyMappers
  class SoyMapper; end
  class WheatMapper; end

  module Grain
    class SoyMapper; end
  end
end

class SoyCollectionMapper; end

module Namespace
  module Nested
    class Rye; end
    class Mung
      alias_method :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

4 entries across 4 versions & 1 rubygems

Version Path
yaks-0.13.0 spec/support/classes_for_policy_testing.rb
yaks-0.12.0 spec/support/classes_for_policy_testing.rb
yaks-0.11.0 spec/support/classes_for_policy_testing.rb
yaks-0.10.0 spec/support/classes_for_policy_testing.rb