From 096fa1b60f537c7c30db35f5576ab351c67a5064 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 24 Mar 2011 23:43:37 +0100 Subject: jQuery is the new default --- .../test/generators/plugin_new_generator_test.rb | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'railties/test/generators/plugin_new_generator_test.rb') diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 3c11c8dbaf..402fd25b14 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -95,41 +95,32 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase def test_skipping_javascripts_without_mountable_option run_generator - assert_no_file "public/javascripts/prototype.js" + assert_no_file "public/javascripts/jquery.js" assert_no_file "public/javascripts/rails.js" - assert_no_file "public/javascripts/controls.js" - assert_no_file "public/javascripts/dragdrop.js" - assert_no_file "public/javascripts/dragdrop.js" assert_no_file "public/javascripts/application.js" end def test_javascripts_generation run_generator [destination_root, "--mountable"] + assert_file "public/javascripts/jquery.js" assert_file "public/javascripts/rails.js" - assert_file "public/javascripts/prototype.js" - assert_file "public/javascripts/controls.js" - assert_file "public/javascripts/dragdrop.js" - assert_file "public/javascripts/dragdrop.js" assert_file "public/javascripts/application.js" end def test_skip_javascripts run_generator [destination_root, "--skip-javascript", "--mountable"] - assert_no_file "public/javascripts/prototype.js" + assert_no_file "public/javascripts/jquery.js" assert_no_file "public/javascripts/rails.js" - assert_no_file "public/javascripts/controls.js" - assert_no_file "public/javascripts/dragdrop.js" - assert_no_file "public/javascripts/dragdrop.js" end def test_ensure_that_javascript_option_is_passed_to_app_generator - run_generator [destination_root, "--javascript", "jquery"] - assert_file "test/dummy/public/javascripts/jquery.js" + run_generator [destination_root, "--javascript", "prototype"] + assert_file "test/dummy/public/javascripts/prototype.js" end def test_ensure_that_skip_javascript_option_is_passed_to_app_generator run_generator [destination_root, "--skip_javascript"] - assert_no_file "test/dummy/public/javascripts/prototype.js" + assert_no_file "test/dummy/public/javascripts/jquery.js" end def test_template_from_dir_pwd -- cgit v1.2.3