タグ

ブックマーク / hkob.hatenablog.com (1)

  • model 関連テストの手抜き法 - hkob’s blog

    モデル同士の関連のテストは,ほぼ似たようなコードになります.これは手抜きをする価値があるということで,spec_helper.rb に以下のコードを書いています.実際には,昨日の Spork.prefork の中に書いてあります. Spork.prefork do (中略) class SpecCreateDeleteCheck def initialize(check_class, hash) @check_class = check_class @check_keys = hash[:check_keys] || [] @relation_strings = hash[:relation_strings] || [] @one_relation_strings = hash[:one_relation_strings] || [] @attributes = hash[:attribu

    model 関連テストの手抜き法 - hkob’s blog
    poppen
    poppen 2011/08/31
    model 関連テストの手抜き法
  • 1