<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>arcright</author_name>
  <author_url>https://blog.hatena.ne.jp/arcright/</author_url>
  <blog_title>chulip.org</blog_title>
  <blog_url>https://chulip.org/</blog_url>
  <categories>
    <anon>RSpec</anon>
  </categories>
  <description>RSpec describe 'hoge' do before do Model.stub_chain(:all, :each).and_yield(1).and_yield(2) end # 以後略... end 実装 Model.all.each do |hoge| p hoge end ↑みたいな事するとhogeが1回目が1。2回目が2になるのでとても便利だなあ。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchulip.org%2Fentry%2F2012%2F12%2F26%2F200705&quot; title=&quot;RSpec and_yieldを使ってブロック付きメソッドのstubを覚えた - chulip.org&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>2012-12-26 20:07:05</published>
  <title>RSpec and_yieldを使ってブロック付きメソッドのstubを覚えた</title>
  <type>rich</type>
  <url>https://chulip.org/entry/2012/12/26/200705</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
