Adds test_helper.rb template to the plugin generator.
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1784 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
2928a3aeeb
commit
9315992d40
4 files changed
+9
-2
No files matched your search
@@ -20,10 +20,12 @@ class RedminePluginGenerator < Rails::Generator::NamedBase
|
|||||||
m.directory "#{plugin_path}/assets/javascripts"
|
m.directory "#{plugin_path}/assets/javascripts"
|
||||||
m.directory "#{plugin_path}/assets/stylesheets"
|
m.directory "#{plugin_path}/assets/stylesheets"
|
||||||
m.directory "#{plugin_path}/lang"
|
m.directory "#{plugin_path}/lang"
|
||||||
|
m.directory "#{plugin_path}/test"
|
||||||
|
|
||||||
m.template 'README', "#{plugin_path}/README"
|
m.template 'README', "#{plugin_path}/README"
|
||||||
m.template 'init.rb', "#{plugin_path}/init.rb"
|
m.template 'init.rb', "#{plugin_path}/init.rb"
|
||||||
m.template 'en.yml', "#{plugin_path}/lang/en.yml"
|
m.template 'en.yml', "#{plugin_path}/lang/en.yml"
|
||||||
|
m.template 'test_helper.rb', "#{plugin_path}/test/test_helper.rb"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Load the normal Rails helper
|
||||||
|
require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper')
|
||||||
|
|
||||||
|
# Ensure that we are using the temporary fixture path
|
||||||
|
Engines::Testing.set_fixture_path
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
require 'test_helper'
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
|
|
||||||
class <%= class_name %>ControllerTest < ActionController::TestCase
|
class <%= class_name %>ControllerTest < ActionController::TestCase
|
||||||
# Replace this with your real tests.
|
# Replace this with your real tests.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
|
require File.dirname(__FILE__) + '/../test_helper'
|
||||||
|
|
||||||
class <%= class_name %>Test < Test::Unit::TestCase
|
class <%= class_name %>Test < Test::Unit::TestCase
|
||||||
fixtures :<%= table_name %>
|
fixtures :<%= table_name %>
|
||||||
|
|||||||
Reference in new issue
Block a user