昔は違った気がするのですが、手元の環境のautotest(ZenTest-3.10.0)とRSpec-1.1.4を使った状態で、テスト中に一度例外が発生した後に、全てのテストをgreenにすると、全てのテストがもう一回全部実行されるという現象が起きています。

全部テストを実行するのは大変なので、とりあえず、.autotest でパッチを当てて回避しました。

   1  class Autotest
   2    alias_method :handle_results_old, :handle_results
   3    undef_method :handle_results
   4  
   5    def handle_results(results)
   6      failed = results.scan(self.failed_results_re)
   7      completed = results =~ self.completed_re
   8  
   9      self.files_to_test = consolidate_failures failed if completed
  10  
  11      color = completed && self.files_to_test.empty? ? :green : :red
  12      hook color unless $TESTING
  13  
  14      #self.tainted = true unless self.files_to_test.empty?
  15      self.tainted = !self.files_to_test.empty?
  16    end
  17  end

L14-15行目が修正箇所です。

posted by Png genki on Sun 6 Jul 2008 at 11:46

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry658
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ