Commit 1782ed45f750440dd9bb96de4a766bd7271d0f53
1 parent
9f56ecfe
Exists in
master
and in
29 other branches
Make plugins tests run correctly
The fact that tables matching /_plugin_/ were being excluded from db/schema.rb broke the tests, because the test database was being created without the necessary tables. And db/schema.rb was already not left untouched anyway, since several plugins add columns to existing Noosfero tables ...
Showing
2 changed files
with
1 additions
and
3 deletions
Show diff stats
lib/tasks/plugins.rake
lib/tasks/plugins_tests.rake
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | def define_task(test, plugins_folder='plugins', plugin = '*') |
5 | 5 | test_files = Dir.glob(File.join(Rails.root, plugins_folder, plugin, 'test', test[:folder], '**', '*_test.rb')) |
6 | 6 | desc 'Runs ' + (plugin != '*' ? plugin : 'plugins') + ' ' + test[:name] + ' tests' |
7 | - Rake::TestTask.new(test[:name].to_sym) do |t| | |
7 | + Rake::TestTask.new(test[:name].to_sym => 'db:test:prepare') do |t| | |
8 | 8 | t.test_files = test_files |
9 | 9 | t.verbose = true |
10 | 10 | end | ... | ... |