aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-08 10:25:29 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-08 10:25:29 -0700
commitd1136e6ad0aab44cfc0626c553b3ee82479f6196 (patch)
tree756926accb05b6d8268d1d425d33b4b7a35d230b /railties/test
parent523820f81b057d102e3c0d0de2fb03a1c7333174 (diff)
parent5fa87281ece411393cb167f03b1deda014a82593 (diff)
downloadrails-d1136e6ad0aab44cfc0626c553b3ee82479f6196.tar.gz
rails-d1136e6ad0aab44cfc0626c553b3ee82479f6196.tar.bz2
rails-d1136e6ad0aab44cfc0626c553b3ee82479f6196.zip
Merge pull request #6681 from arunagw/plugin_gen_fix
Plugin gen fix
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb
index 9e362a6695..0a235b56d5 100644
--- a/railties/test/generators/plugin_new_generator_test.rb
+++ b/railties/test/generators/plugin_new_generator_test.rb
@@ -58,6 +58,14 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
assert_file "test/integration/navigation_test.rb", /ActionDispatch::IntegrationTest/
end
+ def test_generating_test_files_in_full_mode_without_unit_test_files
+ run_generator [destination_root, "-T", "--full"]
+
+ assert_no_directory "test/integration/"
+ assert_no_file "test"
+ assert_no_match(/APP_RAKEFILE/, File.read(File.join(destination_root, "Rakefile")))
+ end
+
def test_ensure_that_plugin_options_are_not_passed_to_app_generator
FileUtils.cd(Rails.root)
assert_no_match(/It works from file!.*It works_from_file/, run_generator([destination_root, "-m", "lib/template.rb"]))
@@ -337,12 +345,10 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
protected
-
def action(*args, &block)
silence(:stdout){ generator.send(*args, &block) }
end
-protected
def default_files
::DEFAULT_PLUGIN_FILES
end