diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-01-03 22:27:28 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-01-03 22:27:28 -0800 |
commit | 5e94d3e3ea06e577d97a32eb4b38b61c4ce8ff8f (patch) | |
tree | b89d06302223be67c595e65bffce54357d41a15a /railties/test/generators/controller_generator_test.rb | |
parent | d7d917335e242f48fae31bc99e6d4ab381244913 (diff) | |
parent | eca11bfdb5d3cf375faf8a24e2dc0cc5abd20f92 (diff) | |
download | rails-5e94d3e3ea06e577d97a32eb4b38b61c4ce8ff8f.tar.gz rails-5e94d3e3ea06e577d97a32eb4b38b61c4ce8ff8f.tar.bz2 rails-5e94d3e3ea06e577d97a32eb4b38b61c4ce8ff8f.zip |
Merge
Diffstat (limited to 'railties/test/generators/controller_generator_test.rb')
-rw-r--r-- | railties/test/generators/controller_generator_test.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/railties/test/generators/controller_generator_test.rb b/railties/test/generators/controller_generator_test.rb index 56bc688ad0..8e2fd3b9ed 100644 --- a/railties/test/generators/controller_generator_test.rb +++ b/railties/test/generators/controller_generator_test.rb @@ -1,12 +1,12 @@ -require 'abstract_unit' require 'generators/generators_test_helper' require 'rails/generators/rails/controller/controller_generator' class ControllerGeneratorTest < GeneratorsTestCase + arguments %w(Account foo bar) def test_help_does_not_show_invoked_generators_options_if_they_already_exist content = run_generator ["--help"] - assert_no_match /Helper options:/, content + assert_no_match /Helper options\:/, content end def test_controller_skeleton_is_created @@ -66,15 +66,8 @@ class ControllerGeneratorTest < GeneratorsTestCase run_generator assert_file "app/controllers/account_controller.rb" do |controller| - assert_instance_method controller, :foo - assert_instance_method controller, :bar + assert_instance_method :foo, controller + assert_instance_method :bar, controller end end - - protected - - def run_generator(args=["Account", "foo", "bar"]) - silence(:stdout) { Rails::Generators::ControllerGenerator.start args, :destination_root => destination_root } - end - end |