<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takapi86</author_name>
  <author_url>https://blog.hatena.ne.jp/takapi86/</author_url>
  <blog_title>takapiのブログ</blog_title>
  <blog_url>https://takapi86.hatenablog.com/</blog_url>
  <categories>
    <anon>資源収集曜日検索API</anon>
  </categories>
  <description>【ごみ収集曜日APIシリーズ】FactoryGirlを追加した - takapi86のブログ の続きです。 前回は、テストを２回目実行しようとすると、ユニーク制約に引っかかりエラーになってしまう問題が残ってしまいました。 今回はその対応として、DatabaseRewinderというGemを使い、Rspecのテスト後に、 Createで作成したTestデータをデータベースから削除するようにしていきます。 github.com 上記のREADME.mdを参考にし導入しました。 導入 Gemfile に database_rewinder を追加して、bundle installします。 テスト環境…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakapi86.hatenablog.com%2Fentry%2F2017%2F04%2F02%2F164117&quot; title=&quot;DatabaseRewinderを追加した - takapiのブログ&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>2017-04-02 16:41:17</published>
  <title>DatabaseRewinderを追加した</title>
  <type>rich</type>
  <url>https://takapi86.hatenablog.com/entry/2017/04/02/164117</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
