<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>heleeen</author_name>
  <author_url>https://blog.hatena.ne.jp/heleeen/</author_url>
  <blog_title>helen's blog</blog_title>
  <blog_url>https://helen.hatenablog.com/</blog_url>
  <categories>
    <anon>rails</anon>
    <anon>rspec</anon>
    <anon>mock</anon>
    <anon>stab</anon>
  </categories>
  <description>helen.hatenablog.com 一晩でさっくり書いたものの追記、修正。 モック・スタブとは 単体テストで必要になるパーツを擬似的に再現する仕組み 使われるところ 揃っていないため「本物」でテストできない時 状況によって変化するオブジェクトがテスト結果に影響する時 モックとスタブの違い モック 「オブジェクトのメソッドがどう呼ばれて何を返すか」というインタフェースも含めたテストのために使う スタブ テストをスムーズに行うために「あるオブジェクトのメソッドが呼ばれたら、ある戻り値を返す」ために使う スタブ RSpectの2系までは以下のようにスタブを使っていました。 obj.stub(:…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhelen.hatenablog.com%2Fentry%2F2015%2F11%2F19%2F122418&quot; title=&quot;(続)railsでモック使ってみた話 - helen&amp;#39;s blog&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>2015-11-19 12:24:18</published>
  <title>(続)railsでモック使ってみた話</title>
  <type>rich</type>
  <url>https://helen.hatenablog.com/entry/2015/11/19/122418</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
