{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.tmtms.net%2Fentry%2F2014%2F10%2F12%2Fruby-test-unit\" title=\"RSpec \u3092\u3084\u3081\u3066 Test::Unit \u306b\u623b\u308b - tmtms \u306e\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","type":"rich","blog_title":"tmtms \u306e\u30e1\u30e2","provider_name":"Hatena Blog","categories":["Ruby"],"author_url":"https://blog.hatena.ne.jp/tmtms/","title":"RSpec \u3092\u3084\u3081\u3066 Test::Unit \u306b\u623b\u308b","image_url":"http://cdn-ak.f.st-hatena.com/images/fotolife/t/tmtms/20141012/20141012233534.png","published":"2014-10-12 23:38:48","url":"https://blog.tmtms.net/entry/2014/10/12/ruby-test-unit","provider_url":"https://hatena.blog","author_name":"tmtms","description":"\u6700\u8fd1\u306e RSpec \u306f\u3001\u305d\u308c\u307e\u3067 obj.stub(hoge: value) \u3068\u66f8\u3051\u305f\u3082\u306e\u304c\u3001 allow(obj).to receive(:hoge).and_return value \u3068\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u304f\u306a\u3063\u305f\u308a\u3068\u304b\u3001\u6b63\u6c17\u306e\u6c99\u6c70\u3068\u306f\u601d\u3048\u306a\u3044\u3088\u3046\u306a\u5909\u66f4\u3092\u3057\u305f\u308a\u3059\u308b\u306e\u3067\u3001\u4f55\u5e74\u304b\u3076\u308a\u306b Test::Unit \u3092\u4f7f\u3063\u3066\u307f\u3088\u3046\u3068\u30ea\u30cf\u30d3\u30ea\u4e2d\u3067\u3059\u3002 RSpec \u306f\u3001\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u5165\u308c\u5b50\u306b\u3067\u304d\u305f\u308a\u3001\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3084 example \u304c\u30af\u30e9\u30b9\u3084\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u306a\u304f\u3001\u6587\u5b57\u5217\u3067\u81ea\u7531\u306b\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u305f\u308a\u3057\u305f\u306e\u304c\u826f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u6700\u8fd1\u306e Test::Unit \u3067\u306f\u305d\u308c\u3082\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 [ruby-list:4\u2026","blog_url":"https://blog.tmtms.net/","width":"100%","version":"1.0"}