{"url":"https://sinsoku.hatenablog.com/entry/2016/01/05/090000","author_url":"https://blog.hatena.ne.jp/sinsoku/","image_url":null,"provider_name":"Hatena Blog","categories":["ruby","rspec","rails"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsinsoku.hatenablog.com%2Fentry%2F2016%2F01%2F05%2F090000\" title=\"ActiveRecord::Callbacks \u3092factory_girl\u3067\u7dba\u9e97\u306bstub\u3059\u308b\u65b9\u6cd5 - \u30a2\u30b8\u30e3\u30a4\u30ebSE\u306e\u6182\u9b31\" 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","width":"100%","provider_url":"https://hatena.blog","description":"ActiveRecord::Callbacks \u306f\u4fbf\u5229\u306a\u306e\u3067\u3059\u304c\u3001\u30c6\u30b9\u30c8\u3067\u30e2\u30c7\u30eb\u3092\u4f5c\u308b\u305f\u3073\u306b\u30e1\u30fc\u30eb\u9001\u4fe1\u306e\u51e6\u7406\u304c\u52d5\u3044\u305f\u308a\u3001\u5225\u30e2\u30c7\u30eb\u304c\u751f\u6210\u3055\u308c\u308b\u3068\u56f0\u308b\u3002 \u3053\u306e\u3042\u305f\u308a\u3092thoughtbot/factory_girl\u3092\u4f7f\u3063\u3066\u7dba\u9e97\u306b\u66f8\u304f\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30b3\u30fc\u30c9 FactoryGirl.define do factory :user do name 'name' transient do stub_methods [] end after :build do |user, evaluator| evaluator.stub_methods.each do |method_name| RSpec::Moc\u2026","published":"2016-01-05 09:00:00","author_name":"sinsoku","blog_url":"https://sinsoku.hatenablog.com/","title":"ActiveRecord::Callbacks \u3092factory_girl\u3067\u7dba\u9e97\u306bstub\u3059\u308b\u65b9\u6cd5","type":"rich","version":"1.0","blog_title":"\u30a2\u30b8\u30e3\u30a4\u30ebSE\u306e\u6182\u9b31"}