2011-02-09から1日間の記事一覧
もちろんテストが先だが、最終的にこんなコードにしたいとする。 class Task def initialize(&block) @block = block end def run @block.call end end で、これまでならこんなテストを書いていたと思う。 describe Task do describe '#run' do before do @s…
もちろんテストが先だが、最終的にこんなコードにしたいとする。 class Task def initialize(&block) @block = block end def run @block.call end end で、これまでならこんなテストを書いていたと思う。 describe Task do describe '#run' do before do @s…