aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2010-06-24 22:05:27 +0700
committerJosé Valim <jose.valim@gmail.com>2010-06-24 20:17:59 +0200
commit67ee6c38b9b112eabe37d5869c23210b9ebf453c (patch)
tree37e73557b64016a1694ffa6a839bd932931bf2bf /railties/test
parent7a7c608a26f03abb1245ff83d4e25040ad09cb44 (diff)
downloadrails-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')
-rw-r--r--railties/test/generators/resource_generator_test.rb8
-rw-r--r--railties/test/generators/scaffold_controller_generator_test.rb14
2 files changed, 0 insertions, 22 deletions
diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb
index 96fd7a0a72..55d5bd6f83 100644
--- a/railties/test/generators/resource_generator_test.rb
+++ b/railties/test/generators/resource_generator_test.rb
@@ -59,14 +59,6 @@ class ResourceGeneratorTest < Rails::Generators::TestCase
end
end
- def test_singleton_resource
- run_generator ["account", "--singleton"]
-
- assert_file "config/routes.rb" do |route|
- assert_match /resource :account$/, route
- end
- end
-
def test_plural_names_are_singularized
content = run_generator ["accounts".freeze]
assert_file "app/models/account.rb", /class Account < ActiveRecord::Base/
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"