]> source.dussan.org Git - redmine.git/commitdiff
Fixes test templates for plugins.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 28 May 2012 09:00:21 +0000 (09:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 28 May 2012 09:00:21 +0000 (09:00 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9737 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/generators/redmine_plugin/redmine_plugin_generator.rb
lib/generators/redmine_plugin_controller/templates/functional_test.rb.erb
lib/generators/redmine_plugin_model/templates/unit_test.rb.erb

index 8e1e4f8220ff4044ea430125f2971e406ef4f99b..562366342feb1849b3fc28b5f8aee9796567d525 100644 (file)
@@ -23,6 +23,10 @@ class RedminePluginGenerator < Rails::Generators::NamedBase
     empty_directory "#{plugin_path}/assets/stylesheets"
     empty_directory "#{plugin_path}/config/locales"
     empty_directory "#{plugin_path}/test"
+    empty_directory "#{plugin_path}/test/fixtures"
+    empty_directory "#{plugin_path}/test/unit"
+    empty_directory "#{plugin_path}/test/functional"
+    empty_directory "#{plugin_path}/test/integration"
 
     template 'README.rdoc',    "#{plugin_path}/README.rdoc"
     template 'init.rb.erb',   "#{plugin_path}/init.rb"
index df332fd21310b21f2b920281ee95505d1b603227..0499b6970727bf77f381e785a2f571bd69a728a7 100644 (file)
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../test_helper'
+require File.expand_path('../../test_helper', __FILE__)
 
 class <%= @controller_class %>ControllerTest < ActionController::TestCase
   # Replace this with your real tests.
index 531510470f974a89a7d1ead4971f370b564cf01c..ad15149fa73de8ebd19e3fb96e4013d4d6399625 100644 (file)
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../test_helper'
+require File.expand_path('../../test_helper', __FILE__)
 
 class <%= @model_class %>Test < ActiveSupport::TestCase