Sha256: 0e64e7ef1937a88caffa16a726666a9587fbea2e0bed345a41b08156f991f567
Contents?: true
Size: 1.22 KB
Versions: 7
Compression:
Stored size: 1.22 KB
Contents
# Copied from rspec-mocks/spec/support class LoadedClass extend RSpec::Support::RubyFeatures M = :m N = :n INSTANCE = LoadedClass.new class << self def respond_to?(method_name, include_all = false) return true if method_name == :dynamic_class_method super end def defined_class_method end def send # fake out! end protected def defined_protected_class_method end private def defined_private_class_method end end def defined_instance_method end def instance_method_with_two_args(a, b) end def instance_method_with_only_defaults(a=1, b=2) end # no eval on opal #if required_kw_args_supported? # Need to eval this since it is invalid syntax on earlier rubies. #eval <<-RUBY def kw_args_method(foo, optional_arg:'hello', required_arg:) end def mixed_args_method(foo, bar, optional_arg_1:1, optional_arg_2:2) end #RUBY #end def send(*) end def respond_to?(method_name, include_all = false) return true if method_name == :dynamic_instance_method super end class Nested; end protected def defined_protected_method end private def defined_private_method "wink wink ;)" end end
Version data entries
7 entries across 7 versions & 2 rubygems