<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>daichi5</author_name>
  <author_url>https://blog.hatena.ne.jp/daichi5/</author_url>
  <blog_title>memo</blog_title>
  <blog_url>https://mem0.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>RSpecでテスト対象オブジェクトからの送信メッセージを検証したくて色々な記事を調べていたところ、モック検証のmatcherにはreceiveとhave_receivedの2つのパターンがあるらしい。 あまり情報は出てこなかったけどこの2つのmatcherの違いは文字通りで receive ・・・ これからメッセージが送信されるかの確認 have_received ・・・ 既にメッセージが送信されたかの確認 のようだ。 つまり subject expect(object).to receive(:method) は動かない。(subjectでテスト対象オブジェクトの振る舞いを実行している前提）…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmem0.hatenablog.jp%2Fentry%2F2022%2F06%2F13%2F005219&quot; title=&quot;RSpecのreceiveとhave_receivedの違い - memo&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-06-13 00:52:19</published>
  <title>RSpecのreceiveとhave_receivedの違い</title>
  <type>rich</type>
  <url>https://mem0.hatenablog.jp/entry/2022/06/13/005219</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
