The following spec fails in master, I'm working on a fix, but it will be quite invasive (prepending modules generated at runtime, and aliasing the user-provided :call method so we can respect the method resolution and only use the topmost call(args)
context 'when subclassing' do
let(:service) do
Class.new do
include Injectable
argument :num, required: true
def call
num + 2
end
end
end
let(:service_subclass) do
Class.new(service) do
def call
super + 3
end
end
end
it 'respects inheritance' do
expect(service_subclass.call(num: 1)).to eq 6
end
end
The following spec fails in master, I'm working on a fix, but it will be quite invasive (prepending modules generated at runtime, and aliasing the user-provided
:callmethod so we can respect the method resolution and only use the topmostcall(args)