diff options
Diffstat (limited to 'railties/test/application/rake_test.rb')
-rw-r--r-- | railties/test/application/rake_test.rb | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 9515e40b6e..fed9dce8e1 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -107,9 +107,9 @@ module ApplicationTests def test_loading_specific_fixtures Dir.chdir(app_path) do - `rails generate model user username:string password:string` - `rails generate model product name:string` - `rake db:migrate` + `rails generate model user username:string password:string; + rails generate model product name:string; + rake db:migrate` end require "#{rails_root}/config/environment" @@ -124,8 +124,8 @@ module ApplicationTests def test_scaffold_tests_pass_by_default content = Dir.chdir(app_path) do - `rails generate scaffold user username:string password:string` - `bundle exec rake db:migrate db:test:clone test` + `rails generate scaffold user username:string password:string; + bundle exec rake db:migrate db:test:clone test` end assert_match(/\d+ tests, \d+ assertions, 0 failures, 0 errors/, content) @@ -133,29 +133,26 @@ module ApplicationTests def test_rake_dump_structure_should_respect_db_structure_env_variable Dir.chdir(app_path) do - `bundle exec rake db:migrate` # ensure we have a schema_migrations table to dump - `bundle exec rake db:structure:dump DB_STRUCTURE=db/my_structure.sql` + # ensure we have a schema_migrations table to dump + `bundle exec rake db:migrate db:structure:dump DB_STRUCTURE=db/my_structure.sql` end assert File.exists?(File.join(app_path, 'db', 'my_structure.sql')) end def test_rake_dump_schema_cache Dir.chdir(app_path) do - `rails generate model post title:string` - `rails generate model product name:string` - `bundle exec rake db:migrate` - `bundle exec rake db:schema:cache:dump` + `rails generate model post title:string; + rails generate model product name:string; + bundle exec rake db:migrate db:schema:cache:dump` end assert File.exists?(File.join(app_path, 'db', 'schema_cache.dump')) end def test_rake_clear_schema_cache Dir.chdir(app_path) do - `bundle exec rake db:schema:cache:dump` - `bundle exec rake db:schema:cache:clear` + `bundle exec rake db:schema:cache:dump db:schema:cache:clear` end assert !File.exists?(File.join(app_path, 'db', 'schema_cache.dump')) end - end end |