diff options
Diffstat (limited to 'railties/test/generators/plugin_new_generator_test.rb')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index d20335ad95..33c8d83f9c 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -103,8 +103,6 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase def test_javascripts_generation run_generator [destination_root, "--mountable"] assert_file "app/assets/javascripts/application.js" - assert_file "vendor/assets/javascripts/jquery.js" - assert_file "vendor/assets/javascripts/jquery_ujs.js" end def test_skip_javascripts @@ -114,16 +112,6 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_no_file "vendor/assets/javascripts/jquery_ujs.js" end - def test_config_prototype_javascript_library - run_generator [destination_root, "-j", "prototype", "--mountable"] - assert_file "app/assets/javascripts/application.js" - assert_file "vendor/assets/javascripts/prototype.js" - assert_file "vendor/assets/javascripts/effects.js" - assert_file "vendor/assets/javascripts/dragdrop.js" - assert_file "vendor/assets/javascripts/controls.js" - assert_file "vendor/assets/javascripts/prototype_ujs.js", /prototype/ - end - def test_template_from_dir_pwd FileUtils.cd(Rails.root) assert_match(/It works from file!/, run_generator([destination_root, "-m", "lib/template.rb"])) @@ -140,13 +128,14 @@ 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 run_generator [destination_root, "--full"] assert_file "app/assets/javascripts" assert_file "app/assets/stylesheets" + assert_file "app/assets/images" assert_file "app/models" assert_file "app/controllers" assert_file "app/views" @@ -162,6 +151,9 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase def test_create_mountable_application_with_mountable_option run_generator [destination_root, "--mountable"] + assert_file "app/assets/javascripts" + assert_file "app/assets/stylesheets" + assert_file "app/assets/images" assert_file "config/routes.rb", /Bukkits::Engine.routes.draw do/ assert_file "lib/bukkits/engine.rb", /isolate_namespace Bukkits/ assert_file "test/dummy/config/routes.rb", /mount Bukkits::Engine => "\/bukkits"/ |