Module: CoreEx::Module::MixInWithArgs::Assertions

Defined in:
lib/core_ex/module/mix_in_with_args.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#klassObject

Returns the value of attribute klass.



81
82
83
# File 'lib/core_ex/module/mix_in_with_args.rb', line 81

def klass
  @klass
end

Instance Method Details

#assert_mixin(aModule, args = [], comment = '') ⇒ Object



83
84
85
86
87
88
89
# File 'lib/core_ex/module/mix_in_with_args.rb', line 83

def assert_mixin ( aModule, args=[], comment='' )
  assert_nothing_raised(comment+" mixin") do
    @module.module_eval { mixin(aModule, *args) }
  end
  assert @module.include?(aModule)
  assert_kind_of aModule, @module.new, comment if @module.is_a? Class
end