Skip to content
Browse files

Remove some line breaks between array items that make the assert file…

… tests harder to read
  • Loading branch information...
1 parent ade6c74 commit 1fef1bedbcb8bc8fe1930a6dc2ad5c9a3c1efe1e @carlosantoniodasilva carlosantoniodasilva committed Nov 4, 2012
View
2 railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb
@@ -32,7 +32,7 @@ def add_resource_route
# route prepends two spaces onto the front of the string that is passed, this corrects that
route route_string[2..-1]
end
-
+
private
def route_string
@route_string ||= ""
View
30 railties/test/generators/namespaced_generators_test.rb
@@ -244,13 +244,9 @@ def test_scaffold_on_invoke
/module TestApp\n class ProductLinesControllerTest < ActionController::TestCase/
# Views
- %w(
- index
- edit
- new
- show
- _form
- ).each { |view| assert_file "app/views/test_app/product_lines/#{view}.html.erb" }
+ %w(index edit new show _form).each do |view|
+ assert_file "app/views/test_app/product_lines/#{view}.html.erb"
+ end
assert_no_file "app/views/layouts/test_app/product_lines.html.erb"
# Helpers
@@ -316,13 +312,9 @@ def test_scaffold_with_namespace_on_invoke
/module TestApp\n class Admin::RolesControllerTest < ActionController::TestCase/
# Views
- %w(
- index
- edit
- new
- show
- _form
- ).each { |view| assert_file "app/views/test_app/admin/roles/#{view}.html.erb" }
+ %w(index edit new show _form).each do |view|
+ assert_file "app/views/test_app/admin/roles/#{view}.html.erb"
+ end
assert_no_file "app/views/layouts/admin/roles.html.erb"
# Helpers
@@ -389,13 +381,9 @@ def test_scaffold_with_nested_namespace_on_invoke
/module TestApp\n class Admin::User::Special::RolesControllerTest < ActionController::TestCase/
# Views
- %w(
- index
- edit
- new
- show
- _form
- ).each { |view| assert_file "app/views/test_app/admin/user/special/roles/#{view}.html.erb" }
+ %w(index edit new show _form).each do |view|
+ assert_file "app/views/test_app/admin/user/special/roles/#{view}.html.erb"
+ end
assert_no_file "app/views/layouts/admin/user/special/roles.html.erb"
# Helpers
View
9 railties/test/generators/scaffold_controller_generator_test.rb
@@ -63,12 +63,9 @@ def test_helper_are_invoked_with_a_pluralized_name
def test_views_are_generated
run_generator
- %w(
- index
- edit
- new
- show
- ).each { |view| assert_file "app/views/users/#{view}.html.erb" }
+ %w(index edit new show).each do |view|
+ assert_file "app/views/users/#{view}.html.erb"
+ end
assert_no_file "app/views/layouts/users.html.erb"
end
View
20 railties/test/generators/scaffold_generator_test.rb
@@ -67,13 +67,9 @@ def test_scaffold_on_invoke
end
# Views
- %w(
- index
- edit
- new
- show
- _form
- ).each { |view| assert_file "app/views/product_lines/#{view}.html.erb" }
+ %w(index edit new show _form).each do |view|
+ assert_file "app/views/product_lines/#{view}.html.erb"
+ end
assert_no_file "app/views/layouts/product_lines.html.erb"
# Helpers
@@ -187,13 +183,9 @@ def test_scaffold_with_namespace_on_invoke
/class Admin::RolesControllerTest < ActionController::TestCase/
# Views
- %w(
- index
- edit
- new
- show
- _form
- ).each { |view| assert_file "app/views/admin/roles/#{view}.html.erb" }
+ %w(index edit new show _form).each do |view|
+ assert_file "app/views/admin/roles/#{view}.html.erb"
+ end
assert_no_file "app/views/layouts/admin/roles.html.erb"
# Helpers

0 comments on commit 1fef1be

Please sign in to comment.
Something went wrong with that request. Please try again.