<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>qnzm</author_name>
  <author_url>https://blog.hatena.ne.jp/qnzm/</author_url>
  <blog_title>qnzm.log(クニジマログ)</blog_title>
  <blog_url>https://qnzm.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>入出力はexpectationsに書き下すのが面倒そうなので普通に例文を写経。ユニットテストだと、こういう外部リソースとのアクセスが絡むとどう扱うか悩みます。DBアクセス(接続確立〜データ取得)、ファイル情報取得、ログ出力、認証付のWebアクセス・・・セオリーで言えば「モックを使え」ってことになるけれど、この場合は入出そのものを扱いたいからそこをモックにしたら何をか言わんや、という。この辺りは「テストできない」と割り切ってしまったほうがよいんでしょうか。 # -*- coding: utf-8 -*- #引数 exp = ARGV.join(&quot; + &quot;) total = ARGV.inject…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqnzm.hatenadiary.org%2Fentry%2F20080816%2F1218882038&quot; title=&quot;「初めてのRuby」の復習(入出力) - qnzm.log(クニジマログ)&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>2008-08-16 19:20:38</published>
  <title>「初めてのRuby」の復習(入出力)</title>
  <type>rich</type>
  <url>https://qnzm.hatenadiary.org/entry/20080816/1218882038</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
