<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Pocke</author_name>
  <author_url>https://blog.hatena.ne.jp/Pocke/</author_url>
  <blog_title>pockestrap</blog_title>
  <blog_url>https://pocke.hatenablog.com/</blog_url>
  <categories>
    <anon>Programming</anon>
    <anon>Ruby</anon>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>TL;DR expect{subject}.to raise_error SystemExit exitをテストする状況はそもそも筋が悪い 前置き こんにちは。私は最近miというRails用のマイグレーションジェネレータを作っています。 github.com Railsのジェネレータは内部でThorというライブラリを使用しています。 このライブラリを使用していく上で、一つ問題が発生しました。 処理を途中で切り上げるためにexitメソッドを使用しないといけない事態に陥ってしまっていました。 問題点 exitはその時点でプロセスを終了するメソッドです。 このメソッドの問題点の一つに、テストがしづら…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpocke.hatenablog.com%2Fentry%2F2016%2F07%2F17%2F085928&quot; title=&quot;RSpecでexitを含むコードをテストする - pockestrap&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>2016-07-17 08:59:28</published>
  <title>RSpecでexitを含むコードをテストする</title>
  <type>rich</type>
  <url>https://pocke.hatenablog.com/entry/2016/07/17/085928</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
