rspec + rcov でテストカバレージをとることを試した。 0. ファイル構成 1. 対象 ruby クラス 2. spec ファイル 3. Rakefile 4. 実行結果 0. ファイル構成 ============== |-- Rakefile |-- spec | `-- foo_spec.rb `-- src `-- foo.rb 1. 対象 ruby クラス ================== $ cat foo.rb class Foo def add x, y x + y end def sub x, y x - y end def div x, y # not use x / y end end 2. spec ファイル =============== $ cat foo_spec.rb require 'foo' describe Foo, "add " d
![rspec + rcov でテストカバレージをとることを試した - katoy: cocolog](https://cdn-ak-scissors.b.st-hatena.com/image/square/a6a33cd2c39cdd00735ea9f50b68355f3909b254/height=288;version=1;width=512/http%3A%2F%2Fyouichi-kato.cocolog-nifty.com%2Fblog%2Fimages%2F2007%2F10%2F14%2Frcov01.png)