2010-11-29 2 views
2

Ruby(B2.0印刷)による連続テストを開始しましたが、すぐに問題が発生しています。第一章ごとに、私は私は、熊手を使って手動でスペックを実行1.5.1Autotest、RSpec 2、Ruby 1.9.2-p0 - 全く出力なし

$ jeweler --rspec twits

ジュエラーを使用して空の宝石がオートテストはRSpecの2のために設定を取得するには、正しい失敗出力

 
$ rake spec 
(in /Users/mfurtak/Documents/Programming/Ruby/twits) 
/Users/mfurtak/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -S bundle exec rspec "spec/twits_spec.rb" 
F 

Failures: 
    1) Twits fails 
    Failure/Error: fail "Trying to get this working" 
    Trying to get this working 
    # ./spec/twits_spec.rb:5:in `block (2 levels) in ' 

Finished in 0.00176 seconds 
1 example, 1 failure 
rake aborted! 

を与えて作成しました本書に記載されており、次の内容でelsewhereとしての私のプロジェクトのルートに./autotest/discover.rbを作成しました:

しかし、RSpec(2.2.0)仕様をオートテスト(ZenTest 4.4.0)で実行しようとすると、出力が全く得られません。

$ autotest

これは、すべてRVM(1.0.2)を通じてRuby 1.9.2-p0を使用しています。私がRuby 1.8.7-p302に切り替えると、ものは期待通りに機能します。

 
$ autotest 
loading autotest/rspec2 
bundle exec /Users/mfurtak/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -S /Users/mfurtak/.rvm/gems/ruby-1.8.7-p302/gems/rspec-core-2.2.1/bin/rspec --tty '/Users/mfurtak/Documents/Programming/Ruby/twits/spec/twits_spec.rb' 
F 

Failures: 

    1) Twits fails 
    Failure/Error: fail "Trying to get this working" 
    Trying to get this working 
    # ./spec/twits_spec.rb:5 

Finished in 0.00036 seconds 
1 example, 1 failure 

答えて

0

、IはZenTest(4.4.0)宝石をアンインストールし、代わりに自動テスト(4.4.5)宝石をインストールしました。その後と

$ bundle install 

ものは、両方のRuby 1.9.2-P0とRuby 1.8.7-P302

 
$ autotest 
loading autotest/rspec2 
style: Rspec2 
bundle exec /Users/mfurtak/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -S /Users/mfurtak/.rvm/gems/ruby-1.9.2-p0/gems/rspec-core-2.2.1/bin/rspec --tty '/Users/mfurtak/Documents/Programming/Ruby/twits/spec/twits_spec.rb' 
F 

Failures: 

    1) Twits fails 
    Failure/Error: fail "Trying to get this working" 
    Trying to get this working 
    # ./spec/twits_spec.rb:5:in `block (2 levels) in ' 

Finished in 0.00036 seconds 
1 example, 1 failure 
で正常に動作しています
1

=]

私は私があなたの問題に役立つと思わオートテストに代わるもので、この宝石を作成しました。 InfinityTestと呼ばれます。 (OK RVMが必要?)

の詳細については以下を参照してください

https://github.com/tomas-stefano/infinity_test

問題があったら、私は私はあなたをお手伝いしますgitubに知らせて!このwiki page自動テストにイタリック重点を留意=)

関連する問題