Sha256: 993508f1c034cdcc83b4cd288f231360283bd495c6e10bd552c366d047967293

Contents?: true

Size: 451 Bytes

Versions: 5

Compression:

Stored size: 451 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Memoizable, '.included' do
  subject { object.class_eval { include Memoizable } }

  let(:object)     { Class.new }
  let(:superclass) { Module    }

  it_behaves_like 'it calls super', :included

  it 'extends the descendant with module methods' do
    subject
    extended_modules = class << object; included_modules end
    expect(extended_modules).to include(Memoizable::ModuleMethods)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
memoizable-0.4.2 spec/unit/memoizable/class_methods/included_spec.rb
memoizable-0.4.1 spec/unit/memoizable/class_methods/included_spec.rb
memoizable-0.4.0 spec/unit/memoizable/class_methods/included_spec.rb
memoizable-0.3.1 spec/unit/memoizable/class_methods/included_spec.rb
memoizable-0.3.0 spec/unit/memoizable/class_methods/included_spec.rb