0
RSpec 2からRSpec 3に移行しています.Rspec 2.99.2ですべての廃止予定を削除しようとしていますが、私は他の廃止予定をすべて解決しました。それはRSpec 2.99.2の不整合アトリビューションを修正する方法
Mailer.stub :grouped_system_event_email, &@email_spy
をスタブ化された場所です60
supports.each{ |support, system_events| Mailer.grouped_system_event_email(support, system_events).deliver_now }
これは元のメソッドである
def grouped_system_event_email(support, system_events)
@recipients = support.email
@subject = "[ #{ENVIRONMENT_NAME} Grouped System Event List] #{system_events.first.customer.symbol}"
@system_events = system_events
mail(to: @recipients, subject: @subject)
エンド
:
stubbing implementations with mismatched arity is deprecated. Called from /path/to/file.rb:60:in `block in deliver_grouped_system_event_notification'.
stubbing implementations with mismatched arity is deprecated. Called from /path/to/file.rb:26:in `send_notification'.
、除いてこれがファイルです
ラムダ& @email_spy
@email_spy = lambda do
@email_sent = true
stub = OpenStruct.new
stub.stub :deliver_now
stub
end