summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-22 17:37:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-22 17:37:16 +0000
commit2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch)
tree7a733c1cc51448ab69b3f892285305dbfb0ae15e /test/test_helper.rb
parenta6ec78a4dc658e3517ed682792016b6530458696 (diff)
downloadredmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz
redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb20
1 files changed, 15 insertions, 5 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 14f2d003f..20f7d50de 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -26,17 +26,25 @@ include ObjectHelpers
require 'awesome_nested_set/version'
+class ActionView::TestCase
+ helper :application
+ include ApplicationHelper
+end
+
class ActiveSupport::TestCase
include ActionDispatch::TestProcess
+ include Shoulda::Context::Assertions
+ include Shoulda::Context::InstanceMethods
+ extend Shoulda::Context::ClassMethods
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false
- ESCAPED_CANT = 'can&#x27;t'
- ESCAPED_UCANT = 'Can&#x27;t'
+ #ESCAPED_CANT = 'can&#x27;t'
+ #ESCAPED_UCANT = 'Can&#x27;t'
# Rails 4.0.2
- #ESCAPED_CANT = 'can&#39;t'
- #ESCAPED_UCANT = 'Can&#39;t'
+ ESCAPED_CANT = 'can&#39;t'
+ ESCAPED_UCANT = 'Can&#39;t'
def log_user(login, password)
User.anonymous
@@ -147,7 +155,9 @@ class ActiveSupport::TestCase
# Returns the path to the test +vendor+ repository
def self.repository_path(vendor)
- Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s
+ path = Rails.root.join("tmp/test/#{vendor.downcase}_repository").to_s
+ # Unlike ruby, JRuby returns Rails.root with backslashes under Windows
+ path.tr("\\", "/")
end
# Returns the url of the subversion test repository