spec/unit/axiom/relation/operation/binary/class_methods/included_spec.rb in axiom-0.1.0 vs spec/unit/axiom/relation/operation/binary/class_methods/included_spec.rb in axiom-0.1.1
- old
+ new
@@ -14,13 +14,13 @@
klass.singleton_class.should include(described_class::ClassMethods)
end
it 'delegates to the ancestor' do
included_ancestor = false
- subject.extend Module.new {
+ mod = Module.new do
define_method(:included) { |_| included_ancestor = true }
- }
- expect {
- klass.send(:include, subject)
- }.to change { included_ancestor }.from(false).to(true)
+ end
+ subject.extend mod
+ expect { klass.send(:include, subject) }
+ .to change { included_ancestor }.from(false).to(true)
end
end