diff options
Diffstat (limited to 'railties/test/generators/resource_generator_test.rb')
-rw-r--r-- | railties/test/generators/resource_generator_test.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb index dff3908ea1..15c0ca0f01 100644 --- a/railties/test/generators/resource_generator_test.rb +++ b/railties/test/generators/resource_generator_test.rb @@ -1,8 +1,8 @@ -require 'abstract_unit' require 'generators/generators_test_helper' require 'rails/generators/rails/resource/resource_generator' class ResourceGeneratorTest < GeneratorsTestCase + arguments %w(account) def setup super @@ -50,8 +50,8 @@ class ResourceGeneratorTest < GeneratorsTestCase run_generator ["account", "--actions", "index", "new"] assert_file "app/controllers/accounts_controller.rb" do |controller| - assert_instance_method controller, :index - assert_instance_method controller, :new + assert_instance_method :index, controller + assert_instance_method :new, controller end assert_file "app/views/accounts/index.html.erb" @@ -96,11 +96,4 @@ class ResourceGeneratorTest < GeneratorsTestCase assert_no_match /resources :accounts$/, route end end - - protected - - def run_generator(args=["account"], config={}) - silence(:stdout) { Rails::Generators::ResourceGenerator.start args, config.merge(:destination_root => destination_root) } - end - end |