diff options
author | Prem Sichanugrist <s@sikachu.com> | 2010-06-24 22:05:27 +0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-24 20:17:59 +0200 |
commit | 67ee6c38b9b112eabe37d5869c23210b9ebf453c (patch) | |
tree | 37e73557b64016a1694ffa6a839bd932931bf2bf /railties/test/generators/scaffold_controller_generator_test.rb | |
parent | 7a7c608a26f03abb1245ff83d4e25040ad09cb44 (diff) | |
download | rails-67ee6c38b9b112eabe37d5869c23210b9ebf453c.tar.gz rails-67ee6c38b9b112eabe37d5869c23210b9ebf453c.tar.bz2 rails-67ee6c38b9b112eabe37d5869c23210b9ebf453c.zip |
Remove the --singeleton option from scaffold generator.
It turned out to be that scaffold for singeleton resource will always depend on another model, and it's not possible at the moment to make the application tests pass after generate the singeleton scafold. So, it would be better to remove it for now and probably provide another generator, such as singeleton_scaffold, in which also require the depended model name.
[#4863 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/test/generators/scaffold_controller_generator_test.rb')
-rw-r--r-- | railties/test/generators/scaffold_controller_generator_test.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/railties/test/generators/scaffold_controller_generator_test.rb b/railties/test/generators/scaffold_controller_generator_test.rb index 8040b22fe6..d55ed22975 100644 --- a/railties/test/generators/scaffold_controller_generator_test.rb +++ b/railties/test/generators/scaffold_controller_generator_test.rb @@ -78,20 +78,6 @@ class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase end end - def test_generates_singleton_controller - run_generator ["User", "name:string", "age:integer", "--singleton"] - - assert_file "app/controllers/users_controller.rb" do |content| - assert_no_match /def index/, content - end - - assert_file "test/functional/users_controller_test.rb" do |content| - assert_no_match /test "should get index"/, content - end - - assert_no_file "app/views/users/index.html.erb" - end - def test_skip_helper_if_required run_generator ["User", "name:string", "age:integer", "--no-helper"] assert_no_file "app/helpers/users_helper.rb" |