Commit c5ab3491c1c4d515d43bc716ebe8eef90a5cf651

Authored by AntonioTerceiro
1 parent 44b396ff

ActionItem172: moving NoosfetoTest module into Noosfero::Test, since it conflict…

…s with NoosferoTest testcase class


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1484 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 2 changed files with 5 additions and 4 deletions   Show diff stats
lib/noosfero/test.rb
1 -module NoosferoTest 1 +module Noosfero::Test
2 2
3 def get(path, parameters = nil, headers = nil) 3 def get(path, parameters = nil, headers = nil)
4 super(path, (parameters ? self.class.extra_parameters.merge(parameters) : self.class.extra_parameters) , headers) 4 super(path, (parameters ? self.class.extra_parameters.merge(parameters) : self.class.extra_parameters) , headers)
@@ -14,10 +14,10 @@ module NoosferoTest @@ -14,10 +14,10 @@ module NoosferoTest
14 def extra_parameters 14 def extra_parameters
15 @noosfero_test_extra_parameters 15 @noosfero_test_extra_parameters
16 end 16 end
17 - include NoosferoTest 17 + include Noosfero::Test
18 end 18 end
19 end 19 end
20 20
21 end 21 end
22 22
23 -Test::Unit::TestCase.send(:extend, NoosferoTest::ClassMethods) 23 +Test::Unit::TestCase.send(:extend, Noosfero::Test::ClassMethods)
test/test_helper.rb
@@ -2,7 +2,8 @@ ENV["RAILS_ENV"] = "test" @@ -2,7 +2,8 @@ ENV["RAILS_ENV"] = "test"
2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment") 2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3 require 'test_help' 3 require 'test_help'
4 require 'mocha' 4 require 'mocha'
5 -require 'noosfero_test' 5 +
  6 +require 'noosfero/test'
6 7
7 class Test::Unit::TestCase 8 class Test::Unit::TestCase
8 # Transactional fixtures accelerate your tests by wrapping each test method 9 # Transactional fixtures accelerate your tests by wrapping each test method