タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

dampに関するmiya-janのブックマーク (1)

  • Testing on the Toilet: Tests Too DRY? Make Them DAMP!

    I get what the author is going for here, but I don't totally agree with them. I think the easiest and cleanest approach is to move the list of users out of set up and into the test (as the author recommends), but personally I would keep the loops and reorganize the code a bit to make it easier to read, so kind of like a DRY DAMP approach? pseudo code: def register_list_of_users(user_list): to_retu

    Testing on the Toilet: Tests Too DRY? Make Them DAMP!
    miya-jan
    miya-jan 2019/12/04
    テストコードはコードが重複しないことよりも読みやすさを重視するという話。DRY原則に対してDAMP原則。必ずしもDRYにしないというわけではなく、例えば冗長性をなくすためにDRYにするとかはある。
  • 1