Автотест: не удалось запустить тесты. Но ничего в журнале

Автотест прервался с обновлением rspec-rails 2.2.1. Теперь я не могу заставить его снова работать ... даже после отката на rspec-rais 2.2.0.

Единственная информация, которую мне удалось найти, - это всплывающее окно Growl с сообщением «Приложение: не удалось запустить тесты». В log/test.log ничего не пишется.

это выводится в консоли:

/Users/meltemi/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb].each { |f| require f }" | unit_diff -u
Loaded suite -e
Started

Finished in 0.003428 seconds.


0 tests, 0 assertions, 0 failures, 0 errors, 0 skips

Test run options: --seed 38767

Есть идеи, с чего начать устранение неполадок? Я бы посмотрел в _5 _..., если бы смог найти!?!

Изменить: попытался запустить автотест с autotest -v и получить в консоли длинный список «Нет сопоставленных тестов ...» (20 ± примеры ниже):

...
No tests matched .git/objects/fe/41f5cc24d667635c46a533fd09bf7bb514e032
No tests matched .git/objects/fe/4577696b2811818fe7439990be0d2f65a892c5
No tests matched .git/objects/fe/e16b09c5e782035a347ed9b257ff9b2b3fa173
No tests matched .git/refs/heads/MenuModel
No tests matched .git/refs/heads/master
No tests matched .git/refs/remotes/origin/master
No tests matched .git/refs/tags/v0.0.1
No tests matched .git/refs/tags/v0.0.1.1
No tests matched .gitignore
No tests matched .rspec
No tests matched Capfile
No tests matched Gemfile
No tests matched Gemfile.lock
No tests matched README
No tests matched Rakefile
No tests matched app/helpers/application_helper.rb
No tests matched autotest/discover.rb
No tests matched config/application.rb
No tests matched config/boot.rb
No tests matched config/database.yml
No tests matched config/deploy.rb
No tests matched config/environment.rb
...

вот конфиг (~/.autotest):

# ~/.autotest
# Include plugins
require 'autotest/fsevent'
require 'autotest/growl'

# ./.autotest
# exceptions (files to ignore) 
# mappings (which files to specifically monitor for changes)
Autotest.add_hook(:initialize) {|at|
  at.add_exception %r{^\.git}  # ignore Version Control System
  at.add_exception %r{^./tmp}  # ignore temp files, lest autotest will run again, and again...
  #  at.clear_mappings         # take out the default (test/test*rb)
  at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
    Dir['spec/**/*.rb']
  }
  nil
}

person Meltemi    schedule 06.12.2010    source источник
comment
Это работает ?: autotest -s rspec2   -  person zetetic    schedule 06.12.2010
comment
да !!!, пожалуйста, включите это в свой ответ, чтобы я мог отдать вам должное. Кроме того, если возможно, расскажите мне, что изменилось, чтобы я мог понять, почему простой ввод autotest больше не работает для меня ... Кажется, я не могу найти справочную страницу для _2 _ .. так что понятия не имею, что сделал -s rspec2.   -  person Meltemi    schedule 06.12.2010


Ответы (1)


autotest -s rspec2 указывает autotest использовать стиль "rspec2", который заставит его искать файлы спецификаций и запускать в них примеры.

Однако это всего лишь обходной путь. Предполагается, что автотест обнаружит спецификации на основе записей в ./autotest/discover.rb вашего проекта. И, как вы обнаружили, недавнее обновление кода нарушило автоматическое обнаружение. Я сам столкнулся с этим и не смог отследить источник.

person zetetic    schedule 07.12.2010