2010-01-28 59 views
3

安裝rspec/ZenTest並運行autospec後,它會按預期的方式首次運行我的規格。在更改我的規格之一,一旦運行,第二次我得到下面的結果後:使用rspec和autospec運行第二個規格後出錯

/usr/bin/ruby1.8 /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec --autospec /home/schambers/Projects/notebook/spec/models/user_spec.rb -O spec/spec.opts 
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/formatter/progress_bar_formatter.rb:17:in `flush': Broken pipe (Errno::EPIPE) 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/formatter/progress_bar_formatter.rb:17:in `example_passed' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:136:in `example_passed' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:136:in `each' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:136:in `example_passed' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/reporter.rb:31:in `example_finished' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:55:in `execute' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:214:in `run_examples' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212:in `each' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212:in `run_examples' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:103:in `run' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:23:in `run' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22:in `each' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22:in `run' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/options.rb:152:in `run_examples' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in `run' 
    from /usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:5 

有沒有人遇到這樣或知道究竟發生了什麼怎麼回事?

感謝

回答

0

進度條要打印的東西TTY,以便它可以在它的運行測試你展示你漂亮的規格進度輸出。我猜測使用autospec分叉進程繼承了STDOUT文件描述符,但無法寫入,因此會引發管道錯誤。

嘗試從RSpec幫助程序中刪除進度條。或者,嘗試在fork之後重新初始化進度條插件。

相關問題