<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>dev-actindi</author_name>
  <author_url>https://blog.hatena.ne.jp/dev-actindi/</author_url>
  <blog_title>アクトインディ開発者ブログ</blog_title>
  <blog_url>https://tech.actindi.net/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>tahara</anon>
  </categories>
  <description>こんにちは、tahara です。 コードに account とか withdraw とか出てきたら悲観ロック（select for update）が必要ですね。 そのテストをするには次のものが必要になるかと思います。 コミットが機能する 複数スレッドがそれぞれ別々のコネクションでトランザクション処理をする RSpec で書くとこんな感じでしょうか。 describe 'Listing Transaction' do # ちゃんとコミットが機能するために self.use_transactional_fixtures = false describe '悲観ロックのテスト' do it 'お金消…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.actindi.net%2F2015%2F11%2F09%2F3656032930&quot; title=&quot;RSpec での悲観ロックのテスト - アクトインディ開発者ブログ&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-09 13:42:10</published>
  <title>RSpec での悲観ロックのテスト</title>
  <type>rich</type>
  <url>https://tech.actindi.net/2015/11/09/3656032930</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
