jdliss / shoulda-callback-matchers

Test existence of your Rails callbacks without having to call them
MIT License
134 stars 18 forks source link

NoMethodError: undefined method `options' for #<ActiveSupport::Callbacks::Callback:0x007fc2ca992bb0> #27

Open zauzaj opened 6 years ago

zauzaj commented 6 years ago

Hi,

After upgrading Rails from 4.1.14 to 4.2, I'm getting this error in my specs consultation.rb

after_commit :schedule_staff_notifier, on: :create, if: :persisted?

consultation_spec.rb

it { expect(consultation).to callback(:schedule_staff_notifier).after(:commit).on(:create) }
 NoMethodError:
    undefined method `options' for #<ActiveSupport::Callbacks::Callback:0x007fc2ca992bb0>

Activesupport version is 4.2.0.

Previously it did work normally.

Is there any way to solve it?

Regards