Sha256: db85ee036287f5d2478440dc8c4beca211286e64a92d675bf1f92322c99adaab

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Function::Unary::Callable, '#included' do
  subject { object.included(descendant) }

  let(:object)     { Class.new(superklass).extend(self.class.described_class) }
  let(:superklass) { Class.new                                                }
  let(:descendant) { mock('descendant')                                       }

  it_should_behave_like 'a command method'

  it 'delegates to the superclass #included method' do
    superklass.should_receive(:included).with(descendant)
    subject
  end

  it 'extends the descendant with Callable' do
    descendant.should_receive(:extend).with(self.class.described_class)
    subject
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/function/unary/callable/included_spec.rb