diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-11-02 15:13:10 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-11-02 17:14:53 +0100 |
commit | f9e33fc09a6731ad56ff8cfe24b49532ed65039c (patch) | |
tree | 74e60eb0b4f7d2c62cbb129ec142f7fea944613c /railties/test/generators | |
parent | fadad11f9056a0166ee490a5eb0a4d9a01120d38 (diff) | |
download | rails-f9e33fc09a6731ad56ff8cfe24b49532ed65039c.tar.gz rails-f9e33fc09a6731ad56ff8cfe24b49532ed65039c.tar.bz2 rails-f9e33fc09a6731ad56ff8cfe24b49532ed65039c.zip |
create_dummy_app method that allows to easily create dummy application from template
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 6b7095ba78..f7f4f0261f 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -56,6 +56,13 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_no_match /It works from file!.*It works_from_file/, run_generator([destination_root, "-m", "lib/template.rb"]) end + def test_ensure_that_test_dummy_can_be_generated_from_a_template + FileUtils.cd(Rails.root) + run_generator([destination_root, "-m", "lib/create_test_dummy_template.rb", "--skip-test-unit"]) + assert_file "spec/dummy" + assert_no_file "test" + end + def test_database_entry_is_assed_by_default_in_full_mode run_generator([destination_root, "--full"]) assert_file "test/dummy/config/database.yml", /sqlite/ @@ -143,9 +150,9 @@ class CustomPluginGeneratorTest < Rails::Generators::TestCase FileUtils.cd(destination_root) run_generator([destination_root, "-b", "#{Rails.root}/lib/plugin_builders/spec_builder.rb"]) assert_file 'spec/spec_helper.rb' + assert_file 'spec/dummy' assert_file 'Rakefile', /task :default => :spec/ assert_file 'Rakefile', /# spec tasks in rakefile/ - assert_file 'spec/dummy' assert_file 'script/rails', %r{spec/dummy} end |