diff options
author | José Valim <jose.valim@gmail.com> | 2010-11-11 20:07:47 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-11 20:07:47 +0100 |
commit | c63600576a7ca63d1a7243308ca8cc7f0e3cde75 (patch) | |
tree | bb24e191a43c8d2cd2770c4766c47ef268df2c6b /railties | |
parent | f912a359aaaffa04fedb2ffd5730284d629b481a (diff) | |
download | rails-c63600576a7ca63d1a7243308ca8cc7f0e3cde75.tar.gz rails-c63600576a7ca63d1a7243308ca8cc7f0e3cde75.tar.bz2 rails-c63600576a7ca63d1a7243308ca8cc7f0e3cde75.zip |
Remove whitespaces and add missing test.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 17 | ||||
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 1 |
2 files changed, 12 insertions, 6 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 6b2026ad0c..7faa674a81 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -83,11 +83,11 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "myapp_moved/config/environment.rb", /Myapp::Application\.initialize!/ assert_file "myapp_moved/config/initializers/session_store.rb", /_myapp_session/ end - + def test_rails_update_generates_correct_session_key app_root = File.join(destination_root, 'myapp') run_generator [app_root] - + Rails.application.config.root = app_root Rails.application.class.stubs(:name).returns("Myapp") Rails.application.stubs(:is_a?).returns(Rails::Application) @@ -137,7 +137,7 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "public/javascripts/rails.js" assert_file "test" end - + def test_javascript_is_skipped_if_required run_generator [destination_root, "--skip-javascript"] assert_file "config/application.rb", /^\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(\)/ @@ -145,7 +145,7 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_no_file "public/javascripts/prototype.js" assert_no_file "public/javascripts/rails.js" end - + def test_config_prototype_javascript_library run_generator [destination_root, "-j", "prototype"] assert_file "config/application.rb", /#\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(jquery rails\)/ @@ -153,7 +153,7 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "public/javascripts/prototype.js" assert_file "public/javascripts/rails.js", /prototype/ end - + def test_config_jquery_javascript_library run_generator [destination_root, "-j", "jquery"] assert_file "config/application.rb", /^\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(jquery rails\)/ @@ -186,6 +186,13 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file 'lib/test_file.rb', 'heres test data' end + def test_test_unit_is_removed_from_frameworks_if_skip_test_unit_is_given + run_generator [destination_root, "--skip-test-unit"] + assert_file "config/application.rb" do |file| + assert_match /config.generators.test_framework = false/, file + end + end + protected def action(*args, &block) diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 8dc5ca90ba..12cae7cfdf 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -18,7 +18,6 @@ DEFAULT_PLUGIN_FILES = %w( test/dummy ) - class PluginNewGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper destination File.join(Rails.root, "tmp/bukkits") |