<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>griefworker</author_name>
  <author_url>https://blog.hatena.ne.jp/griefworker/</author_url>
  <blog_title>present</blog_title>
  <blog_url>https://tnakamura.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Ruby</anon>
  </categories>
  <description>rspec-mocks を使って allow_any_instance_of(User).to receive(:save!).and_raise(ActiveRecord::RecordNotSaved) という風にモデルの保存に失敗するテストを書いていたけど、 Rails 4.2 に更新したら実際に save! を呼び出すところで ArgumentError が発生するようになって嵌った。 ちなみに gem のバージョンは次の通り。 rails 4.2.0 rails-rspec 3.1.0 rspec-core 3.1.0 rspec-mocks 3.1.0 pry-bybug でステッ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftnakamura.hatenablog.com%2Fentry%2F2015%2F02%2F02%2Frspec_mocks_and_raise&quot; title=&quot;rspec-mocks の and_raise で嵌った - present&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-02-02 11:00:00</published>
  <title>rspec-mocks の and_raise で嵌った</title>
  <type>rich</type>
  <url>https://tnakamura.hatenablog.com/entry/2015/02/02/rspec_mocks_and_raise</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
