diff options
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r-- | railties/test/generators/actions_test.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 7d03a37f2a..27b6a49566 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -1,8 +1,10 @@ -require 'abstract_unit' require 'generators/generators_test_helper' require 'rails/generators/rails/app/app_generator' class ActionsTest < GeneratorsTestCase + tests Rails::Generators::AppGenerator + arguments [destination_root] + def setup super @git_plugin_uri = 'git://github.com/technoweenie/restful-authentication.git' @@ -171,21 +173,13 @@ class ActionsTest < GeneratorsTestCase def test_route_should_add_data_to_the_routes_block_in_config_routes run_generator - route_command = "map.route '/login', :controller => 'sessions', :action => 'new'" + route_command = "route '/login', :controller => 'sessions', :action => 'new'" action :route, route_command assert_file 'config/routes.rb', /#{Regexp.escape(route_command)}/ end protected - def run_generator - silence(:stdout) { Rails::Generators::AppGenerator.start [destination_root] } - end - - def generator(config={}) - @generator ||= Rails::Generators::Base.new([], {}, { :destination_root => destination_root }.merge!(config)) - end - def action(*args, &block) silence(:stdout){ generator.send(*args, &block) } end |