aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:55:02 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 20:16:27 +0200
commit80e66cc4d90bf8c15d1a5f6e3152e90147f00772 (patch)
treee7e75464af04f3cf1935b29238dbd7cb2337b0dd /railties/test/generators
parent411ccbdab2608c62aabdb320d52cb02d446bb39c (diff)
downloadrails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.tar.gz
rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.tar.bz2
rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.zip
normalizes indentation and whitespace across the project
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/api_app_generator_test.rb90
-rw-r--r--railties/test/generators/app_generator_test.rb2
-rw-r--r--railties/test/generators/model_generator_test.rb14
3 files changed, 53 insertions, 53 deletions
diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb
index 614ff28da1..bbb814ef4e 100644
--- a/railties/test/generators/api_app_generator_test.rb
+++ b/railties/test/generators/api_app_generator_test.rb
@@ -73,50 +73,50 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase
private
- def default_files
- files = %W(
- .gitignore
- Gemfile
- Rakefile
- config.ru
- app/controllers
- app/mailers
- app/models
- app/views/layouts/mailer.html.erb
- app/views/layouts/mailer.text.erb
- config/environments
- config/initializers
- config/locales
- db
- lib
- lib/tasks
- log
- test/fixtures
- test/controllers
- test/integration
- test/models
- tmp
- vendor
- )
- files.concat %w(bin/bundle bin/rails bin/rake)
- files
- end
+ def default_files
+ files = %W(
+ .gitignore
+ Gemfile
+ Rakefile
+ config.ru
+ app/controllers
+ app/mailers
+ app/models
+ app/views/layouts/mailer.html.erb
+ app/views/layouts/mailer.text.erb
+ config/environments
+ config/initializers
+ config/locales
+ db
+ lib
+ lib/tasks
+ log
+ test/fixtures
+ test/controllers
+ test/integration
+ test/models
+ tmp
+ vendor
+ )
+ files.concat %w(bin/bundle bin/rails bin/rake)
+ files
+ end
- def skipped_files
- %w(app/assets
- app/helpers
- app/views/layouts/application.html.erb
- config/initializers/assets.rb
- config/initializers/cookies_serializer.rb
- lib/assets
- vendor/assets
- test/helpers
- tmp/cache/assets
- public/404.html
- public/422.html
- public/500.html
- public/apple-touch-icon-precomposed.png
- public/apple-touch-icon.png
- public/favicon.ico)
- end
+ def skipped_files
+ %w(app/assets
+ app/helpers
+ app/views/layouts/application.html.erb
+ config/initializers/assets.rb
+ config/initializers/cookies_serializer.rb
+ lib/assets
+ vendor/assets
+ test/helpers
+ tmp/cache/assets
+ public/404.html
+ public/422.html
+ public/500.html
+ public/apple-touch-icon-precomposed.png
+ public/apple-touch-icon.png
+ public/favicon.ico)
+ end
end
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 54c5115fd9..969c2df718 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -745,7 +745,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
sequence = ["install", "exec spring binstub --all", "echo ran after_bundle"]
- @sequence_step ||= 0
+ @sequence_step ||= 0
ensure_bundler_first = -> command do
assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}"
@sequence_step += 1
diff --git a/railties/test/generators/model_generator_test.rb b/railties/test/generators/model_generator_test.rb
index d10671a7b4..6451aa75c9 100644
--- a/railties/test/generators/model_generator_test.rb
+++ b/railties/test/generators/model_generator_test.rb
@@ -6,13 +6,13 @@ class ModelGeneratorTest < Rails::Generators::TestCase
include GeneratorsTestHelper
arguments %w(Account name:string age:integer)
- def test_application_record_skeleton_is_created
- run_generator
- assert_file "app/models/application_record.rb" do |record|
- assert_match(/class ApplicationRecord < ActiveRecord::Base/, record)
- assert_match(/self.abstract_class = true/, record)
- end
- end
+ def test_application_record_skeleton_is_created
+ run_generator
+ assert_file "app/models/application_record.rb" do |record|
+ assert_match(/class ApplicationRecord < ActiveRecord::Base/, record)
+ assert_match(/self.abstract_class = true/, record)
+ end
+ end
def test_help_shows_invoked_generators_options
content = run_generator ["--help"]