Sha256: a2d0d99106ca140fcbd8dad1855ac068bbb31f8afa692f8e1bbc240dad3850e0
Contents?: true
Size: 688 Bytes
Versions: 1
Compression:
Stored size: 688 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Relation::Operation::Set, '.included' do subject { object } let(:object) { described_class } let(:klass) { Class.new } it 'extends the klass' do klass.singleton_class.should_not include(described_class::ClassMethods) klass.send(:include, subject) klass.singleton_class.should include(described_class::ClassMethods) end it 'delegates to the ancestor' do included_ancestor = false subject.extend Module.new { define_method(:included) { |_| included_ancestor = true } } expect { klass.send(:include, subject) }.to change { included_ancestor }.from(false).to(true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.0 | spec/unit/axiom/relation/operation/set/class_methods/included_spec.rb |