Sha256: 8892f910d0e1f53fa9015d0d5100c6f80df678542045ed3c32300600946bb9ae

Contents?: true

Size: 669 Bytes

Versions: 3

Compression:

Stored size: 669 Bytes

Contents

require 'spec_helper'
require 'concerned_inheritance'

describe ConcernedInheritance::ModuleMethods do
  let(:the_module) do
    Module.new do
      extend ConcernedInheritance
    end
  end

  describe '.define_inherited_callback' do
    it 'should include the callback' do
      block = Proc.new { }
      the_module.send :define_inherited_callback, &block
      the_module.inherited_callbacks.should include block
    end
  end

  describe '.inherited' do
    it 'should call define_inherited_callback' do
      block = Proc.new { }
      the_module.should_receive(:define_inherited_callback).with(&block)
      the_module.send :inherited, &block
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
concerned_inheritance-0.0.2 spec/concerned_inheritance/module_methods_spec.rb
concerned_inheritance-0.0.1 spec/concerned_inheritance/module_methods_spec.rb
memory_model-0.0.1 spec/concerned_inheritance/module_methods_spec.rb