{"title":"SomeClass.any_instance.stub(:some_method).ordered => NG","author_name":"kouji0625","url":"https://kouji0625.hatenadiary.org/entry/20130501/p1","published":"2013-05-01 00:00:00","width":"100%","categories":["Ruby","RSpec","Rails"],"description":"RSpec Mock\u306eSomeClass.any_instance.stub(:some_method)\u3057\u305f\u3082\u306e\u306b\u306f\u3001ordered\u30e1\u30bd\u30c3\u30c9\u304c\u306a\u3044\u306e\u3067\u3059\u306d\u3002\u77e5\u3089\u306a\u304b\u3063\u305f\u3002 \u3042\u308b\u30e2\u30c7\u30eb\u3092save!\u3057\u305f\u3042\u3068\u306b\u51e6\u7406\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3001 SomeModel.any_instance.stub(:save!).ordered => \u4f8b\u5916\u767a\u751f \u3067\u6c17\u304c\u4ed8\u304d\u307e\u3057\u305f\u3002 \u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u3001\u51e6\u7406\u3092\u547c\u3073\u51fa\u3057\u305f\u6642\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u66f4\u65b0\u5f8c\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002 it \"...\" do OtherModel.should_receive(:other_method\u2026","type":"rich","image_url":null,"provider_name":"Hatena Blog","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkouji0625.hatenadiary.org%2Fentry%2F20130501%2Fp1\" title=\"SomeClass.any_instance.stub(:some_method).ordered =&gt; NG - \u9ad8\u5c3e\u5b8f\u6cbb\u65e5\u8a18 on \u306f\u3066\u306a\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/kouji0625/","blog_title":"\u9ad8\u5c3e\u5b8f\u6cbb\u65e5\u8a18 on \u306f\u3066\u306a","provider_url":"https://hatena.blog","version":"1.0","blog_url":"https://kouji0625.hatenadiary.org/"}