spec/unit/axiom/function/unary/invertible/class_methods/included_spec.rb in axiom-0.1.0 vs spec/unit/axiom/function/unary/invertible/class_methods/included_spec.rb in axiom-0.1.1
- old
+ new
@@ -17,13 +17,13 @@
klass.send(:include, subject)
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