Commit dcb88edd3992712babc8417c10f389ba22a1a691
1 parent
0ac2e8ca
Exists in
master
and in
29 other branches
Put plugin tests to run
Showing
19 changed files
with
21 additions
and
21 deletions
Show diff stats
lib/noosfero/plugin.rb
@@ -12,8 +12,8 @@ class Noosfero::Plugin | @@ -12,8 +12,8 @@ class Noosfero::Plugin | ||
12 | File.directory?(entry) | 12 | File.directory?(entry) |
13 | end.each do |dir| | 13 | end.each do |dir| |
14 | Rails.configuration.controller_paths << File.join(dir, 'controllers') | 14 | Rails.configuration.controller_paths << File.join(dir, 'controllers') |
15 | - Dependencies.load_paths << File.join(dir, 'controllers') | ||
16 | - [ Dependencies.load_paths, $:].each do |path| | 15 | + ActiveSupport::Dependencies.load_paths << File.join(dir, 'controllers') |
16 | + [ ActiveSupport::Dependencies.load_paths, $:].each do |path| | ||
17 | path << File.join(dir, 'models') | 17 | path << File.join(dir, 'models') |
18 | path << File.join(dir, 'lib') | 18 | path << File.join(dir, 'lib') |
19 | end | 19 | end |
plugins/bsc/test/functional/bsc_plugin_environment_controller_test.rb
@@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' | @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' | ||
5 | # Re-raise errors caught by the controller. | 5 | # Re-raise errors caught by the controller. |
6 | class BscPluginEnvironmentController; def rescue_action(e) raise e end; end | 6 | class BscPluginEnvironmentController; def rescue_action(e) raise e end; end |
7 | 7 | ||
8 | -class BscPluginEnvironmentControllerTest < Test::Unit::TestCase | 8 | +class BscPluginEnvironmentControllerTest < ActiveSupport::TestCase |
9 | 9 | ||
10 | VALID_CNPJ = '94.132.024/0001-48' | 10 | VALID_CNPJ = '94.132.024/0001-48' |
11 | 11 |
plugins/bsc/test/functional/bsc_plugin_myprofile_controller_test.rb
@@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' | @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' | ||
5 | # Re-raise errors caught by the controller. | 5 | # Re-raise errors caught by the controller. |
6 | class BscPluginMyprofileController; def rescue_action(e) raise e end; end | 6 | class BscPluginMyprofileController; def rescue_action(e) raise e end; end |
7 | 7 | ||
8 | -class BscPluginMyprofileControllerTest < Test::Unit::TestCase | 8 | +class BscPluginMyprofileControllerTest < ActiveSupport::TestCase |
9 | 9 | ||
10 | VALID_CNPJ = '94.132.024/0001-48' | 10 | VALID_CNPJ = '94.132.024/0001-48' |
11 | 11 |
plugins/bsc/test/unit/bsc_plugin/associate_enterprise_test.rb
1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' |
2 | require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | 2 | require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' |
3 | 3 | ||
4 | -class BscPlugin::AssociateEnterpriseTest < Test::Unit::TestCase | 4 | +class BscPlugin::AssociateEnterpriseTest < ActiveSupport::TestCase |
5 | VALID_CNPJ = '94.132.024/0001-48' | 5 | VALID_CNPJ = '94.132.024/0001-48' |
6 | 6 | ||
7 | def setup | 7 | def setup |
plugins/bsc/test/unit/bsc_plugin/bsc_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../../../test/test_helper' | @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../../../test/test_helper' | ||
2 | require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | 2 | require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' |
3 | require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' | 3 | require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' |
4 | 4 | ||
5 | -class BscPlugin::BscTest < Test::Unit::TestCase | 5 | +class BscPlugin::BscTest < ActiveSupport::TestCase |
6 | VALID_CNPJ = '94.132.024/0001-48' | 6 | VALID_CNPJ = '94.132.024/0001-48' |
7 | 7 | ||
8 | def setup | 8 | def setup |
plugins/bsc/test/unit/bsc_plugin/contract_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../../../test/test_helper' | @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../../../test/test_helper' | ||
2 | #require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | 2 | #require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' |
3 | #require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' | 3 | #require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' |
4 | 4 | ||
5 | -class BscPlugin::ContractTest < Test::Unit::TestCase | 5 | +class BscPlugin::ContractTest < ActiveSupport::TestCase |
6 | def setup | 6 | def setup |
7 | @contract = BscPlugin::Contract.new(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') | 7 | @contract = BscPlugin::Contract.new(:bsc => BscPlugin::Bsc.new, :client_name => 'Marvin') |
8 | end | 8 | end |
plugins/bsc/test/unit/bsc_plugin/sale_test.rb
1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' |
2 | 2 | ||
3 | -class BscPlugin::SaleTest < Test::Unit::TestCase | 3 | +class BscPlugin::SaleTest < ActiveSupport::TestCase |
4 | def setup | 4 | def setup |
5 | @sale = BscPlugin::Sale.new | 5 | @sale = BscPlugin::Sale.new |
6 | end | 6 | end |
plugins/bsc/test/unit/bsc_plugin_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../../test/test_helper' | @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../../../../test/test_helper' | ||
2 | require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' | 2 | require File.dirname(__FILE__) + '/../../../../app/models/uploaded_file' |
3 | require File.dirname(__FILE__) + '/../../lib/ext/enterprise' | 3 | require File.dirname(__FILE__) + '/../../lib/ext/enterprise' |
4 | 4 | ||
5 | -class BscPluginTest < Test::Unit::TestCase | 5 | +class BscPluginTest < ActiveSupport::TestCase |
6 | 6 | ||
7 | VALID_CNPJ = '94.132.024/0001-48' | 7 | VALID_CNPJ = '94.132.024/0001-48' |
8 | 8 |
plugins/bsc/test/unit/ext/enterprise_test.rb
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | @@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | ||
3 | require File.dirname(__FILE__) + '/../../../../../app/models/enterprise' | 3 | require File.dirname(__FILE__) + '/../../../../../app/models/enterprise' |
4 | require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' | 4 | require File.dirname(__FILE__) + '/../../../lib/ext/enterprise' |
5 | 5 | ||
6 | -class EnterpriseTest < Test::Unit::TestCase | 6 | +class EnterpriseTest < ActiveSupport::TestCase |
7 | VALID_CNPJ = '94.132.024/0001-48' | 7 | VALID_CNPJ = '94.132.024/0001-48' |
8 | 8 | ||
9 | def setup | 9 | def setup |
plugins/bsc/test/unit/ext/product_test.rb
1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' |
2 | require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' | 2 | require File.dirname(__FILE__) + '/../../../../../app/models/uploaded_file' |
3 | 3 | ||
4 | -class ProductTest < Test::Unit::TestCase | 4 | +class ProductTest < ActiveSupport::TestCase |
5 | VALID_CNPJ = '94.132.024/0001-48' | 5 | VALID_CNPJ = '94.132.024/0001-48' |
6 | 6 | ||
7 | should 'return have bsc' do | 7 | should 'return have bsc' do |
plugins/send_email/test/functional/send_email_plugin_admin_controller_test.rb
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../controllers/send_email_plugin_admin_con | @@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../controllers/send_email_plugin_admin_con | ||
4 | # Re-raise errors caught by the controller. | 4 | # Re-raise errors caught by the controller. |
5 | class SendEmailPluginAdminController; def rescue_action(e) raise e end; end | 5 | class SendEmailPluginAdminController; def rescue_action(e) raise e end; end |
6 | 6 | ||
7 | -class SendEmailPluginAdminControllerTest < Test::Unit::TestCase | 7 | +class SendEmailPluginAdminControllerTest < ActiveSupport::TestCase |
8 | 8 | ||
9 | def setup | 9 | def setup |
10 | @controller = SendEmailPluginAdminController.new | 10 | @controller = SendEmailPluginAdminController.new |
plugins/send_email/test/functional/send_email_plugin_base_controller_test.rb
@@ -51,7 +51,7 @@ def run_common_tests | @@ -51,7 +51,7 @@ def run_common_tests | ||
51 | end | 51 | end |
52 | end | 52 | end |
53 | 53 | ||
54 | -class SendEmailPluginProfileControllerTest < Test::Unit::TestCase | 54 | +class SendEmailPluginProfileControllerTest < ActiveSupport::TestCase |
55 | def setup | 55 | def setup |
56 | @controller = SendEmailPluginProfileController.new | 56 | @controller = SendEmailPluginProfileController.new |
57 | @request = ActionController::TestRequest.new | 57 | @request = ActionController::TestRequest.new |
@@ -66,7 +66,7 @@ class SendEmailPluginProfileControllerTest < Test::Unit::TestCase | @@ -66,7 +66,7 @@ class SendEmailPluginProfileControllerTest < Test::Unit::TestCase | ||
66 | run_common_tests() | 66 | run_common_tests() |
67 | end | 67 | end |
68 | 68 | ||
69 | -class SendEmailPluginEnvironmentControllerTest < Test::Unit::TestCase | 69 | +class SendEmailPluginEnvironmentControllerTest < ActiveSupport::TestCase |
70 | def setup | 70 | def setup |
71 | @controller = SendEmailPluginEnvironmentController.new | 71 | @controller = SendEmailPluginEnvironmentController.new |
72 | @request = ActionController::TestRequest.new | 72 | @request = ActionController::TestRequest.new |
plugins/send_email/test/unit/send_email_plugin_mail_test.rb
1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
2 | 2 | ||
3 | -class SendEmailPluginMailTest < Test::Unit::TestCase | 3 | +class SendEmailPluginMailTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @environment = mock() | 6 | @environment = mock() |
plugins/send_email/test/unit/send_email_plugin_sender_test.rb
1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
2 | 2 | ||
3 | -class SendEmailPluginSenderTest < Test::Unit::TestCase | 3 | +class SendEmailPluginSenderTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | ActionMailer::Base.delivery_method = :test | 6 | ActionMailer::Base.delivery_method = :test |
plugins/send_email/test/unit/send_email_plugin_test.rb
1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
2 | 2 | ||
3 | -class SendEmailPluginTest < Test::Unit::TestCase | 3 | +class SendEmailPluginTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @plugin = SendEmailPlugin.new | 6 | @plugin = SendEmailPlugin.new |
plugins/shopping_cart/test/functional/shopping_cart_plugin_myprofile_controller_test.rb
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../controllers/shopping_cart_plugin_myprof | @@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../controllers/shopping_cart_plugin_myprof | ||
4 | # Re-raise errors caught by the controller. | 4 | # Re-raise errors caught by the controller. |
5 | class ShoppingCartPluginMyprofileController; def rescue_action(e) raise e end; end | 5 | class ShoppingCartPluginMyprofileController; def rescue_action(e) raise e end; end |
6 | 6 | ||
7 | -class ShoppingCartPluginMyprofileControllerTest < Test::Unit::TestCase | 7 | +class ShoppingCartPluginMyprofileControllerTest < ActiveSupport::TestCase |
8 | 8 | ||
9 | TIME_FORMAT = '%Y-%m-%d' | 9 | TIME_FORMAT = '%Y-%m-%d' |
10 | 10 |
plugins/shopping_cart/test/functional/shopping_cart_plugin_profile_controller_test.rb
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../controllers/shopping_cart_plugin_profil | @@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../controllers/shopping_cart_plugin_profil | ||
4 | # Re-raise errors caught by the controller. | 4 | # Re-raise errors caught by the controller. |
5 | class ShoppingCartPluginProfileController; def rescue_action(e) raise e end; end | 5 | class ShoppingCartPluginProfileController; def rescue_action(e) raise e end; end |
6 | 6 | ||
7 | -class ShoppingCartPluginProfileControllerTest < Test::Unit::TestCase | 7 | +class ShoppingCartPluginProfileControllerTest < ActiveSupport::TestCase |
8 | 8 | ||
9 | def setup | 9 | def setup |
10 | @controller = ShoppingCartPluginProfileController.new | 10 | @controller = ShoppingCartPluginProfileController.new |
plugins/shopping_cart/test/unit/shopping_cart_plugin/cart_helper_test.rb
1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../../test/test_helper' |
2 | 2 | ||
3 | -class ShoppingCartPlugin::CartHelperTest < Test::Unit::TestCase | 3 | +class ShoppingCartPlugin::CartHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | include ShoppingCartPlugin::CartHelper | 5 | include ShoppingCartPlugin::CartHelper |
6 | 6 |
plugins/shopping_cart/test/unit/shopping_cart_plugin_test.rb
1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' | 1 | require File.dirname(__FILE__) + '/../../../../test/test_helper' |
2 | 2 | ||
3 | -class ShoppingCartPluginTest < Test::Unit::TestCase | 3 | +class ShoppingCartPluginTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @shopping_cart = ShoppingCartPlugin.new | 6 | @shopping_cart = ShoppingCartPlugin.new |