diff --git a/lib/generators/redmine_plugin/redmine_plugin_generator.rb b/lib/generators/redmine_plugin/redmine_plugin_generator.rb index 8e1e4f822..562366342 100644 --- a/lib/generators/redmine_plugin/redmine_plugin_generator.rb +++ b/lib/generators/redmine_plugin/redmine_plugin_generator.rb @@ -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" diff --git a/lib/generators/redmine_plugin_controller/templates/functional_test.rb.erb b/lib/generators/redmine_plugin_controller/templates/functional_test.rb.erb index df332fd21..0499b6970 100644 --- a/lib/generators/redmine_plugin_controller/templates/functional_test.rb.erb +++ b/lib/generators/redmine_plugin_controller/templates/functional_test.rb.erb @@ -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. diff --git a/lib/generators/redmine_plugin_model/templates/unit_test.rb.erb b/lib/generators/redmine_plugin_model/templates/unit_test.rb.erb index 531510470..ad15149fa 100644 --- a/lib/generators/redmine_plugin_model/templates/unit_test.rb.erb +++ b/lib/generators/redmine_plugin_model/templates/unit_test.rb.erb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/../test_helper' +require File.expand_path('../../test_helper', __FILE__) class <%= @model_class %>Test < ActiveSupport::TestCase