Rails3: test: scm: move "repository_path_hash" method in repositories routing test to test_helper.rb for common use

Rails3 new route format returns path param as string not array.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8923 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-02-23 06:11:59 +00:00
parent aa286a8e3f
commit 21cb2ee817
2 changed files with 7 additions and 9 deletions

View File

@ -366,13 +366,4 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
{ :controller => 'repositories', :action => 'remove_related_issue', :id => 'redmine', :repository_id => 'foo', :rev => '123', :issue_id => '25' }
)
end
private
def repository_path_hash(arr)
hs = {}
hs[:path] = arr.join("/")
hs[:param] = arr
hs
end
end

View File

@ -143,6 +143,13 @@ class ActiveSupport::TestCase
File.directory?(repository_path(vendor))
end
def repository_path_hash(arr)
hs = {}
hs[:path] = arr.join("/")
hs[:param] = arr
hs
end
def assert_error_tag(options={})
assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options))
end