diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-25 11:14:39 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-25 11:14:39 +0200 |
commit | 2bc48561d54abaa09eeaa763f9017afb0c6ff87f (patch) | |
tree | c1d8a07df075ec6291668055ac10c50e351abbd3 | |
parent | 8d00dfca7f6ea528ed5344b6cc1058c9f0402361 (diff) | |
download | rails-2bc48561d54abaa09eeaa763f9017afb0c6ff87f.tar.gz rails-2bc48561d54abaa09eeaa763f9017afb0c6ff87f.tar.bz2 rails-2bc48561d54abaa09eeaa763f9017afb0c6ff87f.zip |
Fix tests.
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 8 | ||||
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 563bff28be..126aadb88d 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -13,11 +13,13 @@ module Rails directory "app" template "#{app_templates_dir}/app/views/layouts/application.html.erb.tt", "app/views/layouts/#{name}/application.html.erb" + empty_directory_with_gitkeep "app/assets/images" elsif full? empty_directory_with_gitkeep "app/models" empty_directory_with_gitkeep "app/controllers" empty_directory_with_gitkeep "app/views" empty_directory_with_gitkeep "app/helpers" + empty_directory_with_gitkeep "app/assets/images" end end @@ -135,12 +137,6 @@ task :default => :test end end - def images - if mountable? - empty_directory_with_gitkeep "app/assets/images" - end - end - def script(force = false) directory "script", :force => force do |content| "#{shebang}\n" + content diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index d12dc6925a..fb956a8335 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -140,7 +140,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase run_generator [destination_root, "--full", "--skip_active_record"] FileUtils.cd destination_root `bundle install` - assert_match(/2 tests, 2 assertions, 0 failures, 0 errors/, `bundle exec rake test`) + assert_match(/1 tests, 1 assertions, 0 failures, 0 errors/, `bundle exec rake test`) end def test_creating_engine_in_full_mode |