diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:55:02 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 20:16:27 +0200 |
commit | 80e66cc4d90bf8c15d1a5f6e3152e90147f00772 (patch) | |
tree | e7e75464af04f3cf1935b29238dbd7cb2337b0dd /railties/test/application/rake | |
parent | 411ccbdab2608c62aabdb320d52cb02d446bb39c (diff) | |
download | rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.tar.gz rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.tar.bz2 rails-80e66cc4d90bf8c15d1a5f6e3152e90147f00772.zip |
normalizes indentation and whitespace across the project
Diffstat (limited to 'railties/test/application/rake')
-rw-r--r-- | railties/test/application/rake/migrations_test.rb | 72 | ||||
-rw-r--r-- | railties/test/application/rake/notes_test.rb | 34 |
2 files changed, 53 insertions, 53 deletions
diff --git a/railties/test/application/rake/migrations_test.rb b/railties/test/application/rake/migrations_test.rb index b3e95769fa..d608fa1976 100644 --- a/railties/test/application/rake/migrations_test.rb +++ b/railties/test/application/rake/migrations_test.rb @@ -42,17 +42,17 @@ module ApplicationTests `bin/rails generate model user username:string password:string; bin/rails generate migration add_email_to_users email:string` - output = `bin/rails db:migrate` - assert_match(/create_table\(:users\)/, output) - assert_match(/CreateUsers: migrated/, output) - assert_match(/add_column\(:users, :email, :string\)/, output) - assert_match(/AddEmailToUsers: migrated/, output) - - output = `bin/rails db:rollback STEP=2` - assert_match(/drop_table\(:users\)/, output) - assert_match(/CreateUsers: reverted/, output) - assert_match(/remove_column\(:users, :email, :string\)/, output) - assert_match(/AddEmailToUsers: reverted/, output) + output = `bin/rails db:migrate` + assert_match(/create_table\(:users\)/, output) + assert_match(/CreateUsers: migrated/, output) + assert_match(/add_column\(:users, :email, :string\)/, output) + assert_match(/AddEmailToUsers: migrated/, output) + + output = `bin/rails db:rollback STEP=2` + assert_match(/drop_table\(:users\)/, output) + assert_match(/CreateUsers: reverted/, output) + assert_match(/remove_column\(:users, :email, :string\)/, output) + assert_match(/AddEmailToUsers: reverted/, output) end end @@ -107,22 +107,22 @@ module ApplicationTests bin/rails generate migration add_email_to_users email:string; bin/rails db:migrate` - output = `bin/rails db:migrate:status` + output = `bin/rails db:migrate:status` - assert_match(/up\s+\d{14}\s+Create users/, output) - assert_match(/up\s+\d{14}\s+Add email to users/, output) + assert_match(/up\s+\d{14}\s+Create users/, output) + assert_match(/up\s+\d{14}\s+Add email to users/, output) - `bin/rails db:rollback STEP=2` - output = `bin/rails db:migrate:status` + `bin/rails db:rollback STEP=2` + output = `bin/rails db:migrate:status` - assert_match(/down\s+\d{14}\s+Create users/, output) - assert_match(/down\s+\d{14}\s+Add email to users/, output) + assert_match(/down\s+\d{14}\s+Create users/, output) + assert_match(/down\s+\d{14}\s+Add email to users/, output) - `bin/rails db:migrate:redo` - output = `bin/rails db:migrate:status` + `bin/rails db:migrate:redo` + output = `bin/rails db:migrate:status` - assert_match(/up\s+\d{14}\s+Create users/, output) - assert_match(/up\s+\d{14}\s+Add email to users/, output) + assert_match(/up\s+\d{14}\s+Create users/, output) + assert_match(/up\s+\d{14}\s+Add email to users/, output) end end @@ -134,22 +134,22 @@ module ApplicationTests bin/rails generate migration add_email_to_users email:string; bin/rails db:migrate` - output = `bin/rails db:migrate:status` + output = `bin/rails db:migrate:status` - assert_match(/up\s+\d{3,}\s+Create users/, output) - assert_match(/up\s+\d{3,}\s+Add email to users/, output) + assert_match(/up\s+\d{3,}\s+Create users/, output) + assert_match(/up\s+\d{3,}\s+Add email to users/, output) - `bin/rails db:rollback STEP=2` - output = `bin/rails db:migrate:status` + `bin/rails db:rollback STEP=2` + output = `bin/rails db:migrate:status` - assert_match(/down\s+\d{3,}\s+Create users/, output) - assert_match(/down\s+\d{3,}\s+Add email to users/, output) + assert_match(/down\s+\d{3,}\s+Create users/, output) + assert_match(/down\s+\d{3,}\s+Add email to users/, output) - `bin/rails db:migrate:redo` - output = `bin/rails db:migrate:status` + `bin/rails db:migrate:redo` + output = `bin/rails db:migrate:status` - assert_match(/up\s+\d{3,}\s+Create users/, output) - assert_match(/up\s+\d{3,}\s+Add email to users/, output) + assert_match(/up\s+\d{3,}\s+Create users/, output) + assert_match(/up\s+\d{3,}\s+Add email to users/, output) end end @@ -168,10 +168,10 @@ module ApplicationTests `bin/rails db:migrate` - output = `bin/rails db:migrate:status` + output = `bin/rails db:migrate:status` - assert_match(/up\s+001\s+One migration/, output) - assert_match(/up\s+002\s+Two migration/, output) + assert_match(/up\s+001\s+One migration/, output) + assert_match(/up\s+002\s+Two migration/, output) end end diff --git a/railties/test/application/rake/notes_test.rb b/railties/test/application/rake/notes_test.rb index c0ff3af193..b3f379d707 100644 --- a/railties/test/application/rake/notes_test.rb +++ b/railties/test/application/rake/notes_test.rb @@ -140,29 +140,29 @@ module ApplicationTests private - def run_rake_notes(command = "bin/rails notes") - boot_rails - load_tasks + def run_rake_notes(command = "bin/rails notes") + boot_rails + load_tasks - Dir.chdir(app_path) do - output = `#{command}` - lines = output.scan(/\[([0-9\s]+)\]\s/).flatten + Dir.chdir(app_path) do + output = `#{command}` + lines = output.scan(/\[([0-9\s]+)\]\s/).flatten - yield output, lines + yield output, lines + end end - end - def load_tasks - require "rake" - require "rdoc/task" - require "rake/testtask" + def load_tasks + require "rake" + require "rdoc/task" + require "rake/testtask" - Rails.application.load_tasks - end + Rails.application.load_tasks + end - def boot_rails - require "#{app_path}/config/environment" - end + def boot_rails + require "#{app_path}/config/environment" + end end end end |