У меня очень похожая проблема: Mr. Limpens, с одним основным отличием: I do включает в себя test_unit railtie в моем приложении.rb.Задача проверки рейка Rail3 не работает
С моей application.rb:
require File.expand_path('../boot', __FILE__) # Pick the frameworks you want: require 'action_controller/railtie' require 'dm-rails/railtie' # require 'action_mailer/railtie' # require 'active_resource/railtie' require 'rails/test_unit/railtie' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler)
Вы заметите, что я использую DataMapper и инициализируется мой проект с dm-rails начальной загрузки. Я могу запустить свои тесты вручную, например, так:
$ ruby -Itest test/unit/test_habit.rb Loaded suite test/unit/test_habit Started ..... Finished in 2.554523 seconds. 5 tests, 7 assertions, 0 failures, 0 errors, 0 skips Test run options: --seed 15947
но при выполнении тестовых рек задачи тестов не выполняются, например, так:
$ rake test --trace (in /home/blt/Documents/projects/rails3apps/naughtyapp) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke test:prepare (first_time) ** Execute test:prepare ** Execute test:units ** Invoke test:functionals (first_time) ** Invoke test:prepare ** Execute test:functionals ** Invoke test:integration (first_time) ** Invoke test:prepare ** Execute test:integration
Каждого прогон «first_time» отображается в скобках. Что я должен делать неправильно, что мои тесты не выполняются?
Вы абсолютно правы. Как забавно! – troutwine