我想为Jenkins安装Blue Ocean.谁能告诉我这样做的步骤.
我已经定义了after_commit回调update.它不会在rspec中触发.
这是我的回调:
after_commit :notify_trip, :if => Proc.new { |trip| trip.can_send_schedule_notification? }, on: :update
Run Code Online (Sandbox Code Playgroud)
这是我的rspec代码:
@work_order.update_attributes(:status_id => statuses(:scheduled).id, :tour_id => @tour.id)
@work_order.run_callbacks(:commit)
assert_equal 1, ActionMailer::Base.deliveries.size
expect(ActionMailer::Base.deliveries[0].to).to include(@user.email)
expect(ActionMailer::Base.deliveries[0].subject).to include("Your trip has been scheduled!")
Run Code Online (Sandbox Code Playgroud)
这里回调不是调用和ActionMailer::Base.deliveries.size返回0
对此有什么建议吗?