Closed asia653 closed 8 years ago
Additional information - it appears that the new syntax does not work
Looking at your tests, it requires the old format of after_commit :method, :on => :action
Interesting, thanks for raising this - I think this could be quite simply adapted to, by adding something like:
it { is_expected.to callback(:upload_image).after(:commit).on(:create, :update) }
to the matchers. I'll bring this in as soon as I find the time.
I can provide a test case
class User < ActiveRecord::Base
after_commit :upload_image, on: [:update,:create]
end
it { is_expected.to callback(:upload_image).after(:commit).on(:update) }
Fails^