<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ria10</author_name>
  <author_url>https://blog.hatena.ne.jp/ria10/</author_url>
  <blog_title>リア充爆発日記</blog_title>
  <blog_url>https://ria10.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
    <anon>unit test</anon>
  </categories>
  <description>何かの拍子にテストの一部が通らなくなった。コードを追ってみても原因がわからず、そこそこハマった結果、DBにゴミデータが残っていることが原因だとわかった。きっと実行の途中で止めちゃったりしたんだろう。 また同じようなことが起きたら、きっとこれを思い出さずに、同じくらいハマるんだろうな、と思って、テスト起動時にDBをクリアできるものないかな、と探してみたらソッコー見つかった。https://github.com/bmabey/database_cleaner そのまんま。設定もかんたん。 Gemfile ~snip~ gem 'database_cleaner' ~snip~ spec_helpe…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fria10.hatenablog.com%2Fentry%2F20130806%2F1375800290&quot; title=&quot;RSpecのおともにdatabase_cleaner - リア充爆発日記&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>http://ecx.images-amazon.com/images/I/51-3T735zLL.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-08-06 23:44:50</published>
  <title>RSpecのおともにdatabase_cleaner</title>
  <type>rich</type>
  <url>https://ria10.hatenablog.com/entry/20130806/1375800290</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
