{"provider_name":"Hatena Blog","width":"100%","title":"rspec3\u3067\u6a19\u6e96\u5165\u529b\u3068\u6a19\u6e96\u51fa\u529b\u306e\u30c6\u30b9\u30c8","provider_url":"https://hatena.blog","height":"190","author_name":"ganmacs","image_url":null,"blog_url":"https://ganmacs.hatenablog.com/","blog_title":"memo-mode","version":"1.0","type":"rich","author_url":"https://blog.hatena.ne.jp/ganmacs/","categories":["Ruby","RSpec"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fganmacs.hatenablog.com%2Fentry%2F2014%2F07%2F26%2F231607\" title=\"rspec3\u3067\u6a19\u6e96\u5165\u529b\u3068\u6a19\u6e96\u51fa\u529b\u306e\u30c6\u30b9\u30c8 - memo-mode\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://ganmacs.hatenablog.com/entry/2014/07/26/231607","description":"rspec\u3067\u6a19\u6e96\u5165\u529b\u304b\u3089\u30e6\u30fc\u30b6\u306e\u5165\u529b\u3092\u53d7\u3051\u53d6\u3063\u3066\u6a19\u6e96\u51fa\u529b\u306b\u51fa\u529b\u3059\u308b\u65b9\u6cd5\u306e\u899a\u66f8 rspec2\u3068rspec3\u304c\u307e\u3056\u3063\u3066\u3066\u3084\u3084\u3053\u3057\u304b\u3063\u305f \u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9 solver.rb get\u3067\u30e6\u30fc\u30b6\u306e\u5165\u529b\u3092\u53d7\u3051\u53d6\u3063\u3066print\u3067\u6a19\u6e96\u51fa\u529b\u306b\u7b54\u3048(\u6587\u5b57\u5217)\u3092\u51fa\u529b\u3059\u308b\u306e\u30af\u30e9\u30b9 class Solver attr_reader :n def get @n = gets end def print puts 'answer is foo' end end \u30c6\u30b9\u30c8\u30b3\u30fc\u30c9 solver_spec.rb \u6a19\u6e96\u5165\u529b\u3067\u306fallow(ARGF).to receive(:gets) { 1000 }\u3068\u3059\u308b\u3068\u3044\u3044\u3089\u3057\u3044\uff0e 100\u2026","published":"2014-07-26 23:16:07"}