diff options
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 1e1c7cfb04..6f0bad06b9 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -144,6 +144,11 @@ class AppGeneratorTest < GeneratorsTestCase assert_match "rails:generators:app", Rails::Generators::AppGenerator.namespace end + def test_file_is_added_for_backwards_compatibility + action :file, 'lib/test_file.rb', 'heres test data' + assert_file 'lib/test_file.rb', 'heres test data' + end + protected def run_generator(args=[]) @@ -154,4 +159,8 @@ class AppGeneratorTest < GeneratorsTestCase @generator ||= Rails::Generators::AppGenerator.new([destination_root], options, :root => destination_root) end + def action(*args, &block) + silence(:stdout){ generator.send(*args, &block) } + end + end |