diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-07 00:06:08 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-12-07 00:06:08 -0200 |
commit | cf05e5f6ea9d5d883ed510dd01531a13ff488182 (patch) | |
tree | e87398d985f9142343c90ea9f18149bf644a2230 /railties/test/application | |
parent | 0e67f793cd67ad96abbe7e9b3ba1363fdedb8e71 (diff) | |
download | rails-cf05e5f6ea9d5d883ed510dd01531a13ff488182.tar.gz rails-cf05e5f6ea9d5d883ed510dd01531a13ff488182.tar.bz2 rails-cf05e5f6ea9d5d883ed510dd01531a13ff488182.zip |
Stop shelling out more than necessary
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/rake/dbs_test.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index ca19be3c52..ccb47663d4 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -55,8 +55,8 @@ module ApplicationTests def db_migrate_and_status Dir.chdir(app_path) do - `rails generate model book title:string` - `bundle exec rake db:migrate` + `rails generate model book title:string; + bundle exec rake db:migrate` output = `bundle exec rake db:migrate:status` assert_match(/database:\s+\S+#{expected[:database]}/, output) assert_match(/up\s+\d{14}\s+Create books/, output) @@ -78,8 +78,8 @@ module ApplicationTests def db_schema_dump Dir.chdir(app_path) do - `rails generate model book title:string` - `rake db:migrate db:schema:dump` + `rails generate model book title:string; + rake db:migrate db:schema:dump` schema_dump = File.read("db/schema.rb") assert_match(/create_table \"books\"/, schema_dump) end @@ -96,8 +96,8 @@ module ApplicationTests def db_fixtures_load Dir.chdir(app_path) do - `rails generate model book title:string` - `bundle exec rake db:migrate db:fixtures:load` + `rails generate model book title:string; + bundle exec rake db:migrate db:fixtures:load` assert_match(/#{expected[:database]}/, ActiveRecord::Base.connection_config[:database]) require "#{app_path}/app/models/book" @@ -120,8 +120,8 @@ module ApplicationTests def db_structure_dump_and_load Dir.chdir(app_path) do - `rails generate model book title:string` - `bundle exec rake db:migrate db:structure:dump` + `rails generate model book title:string; + bundle exec rake db:migrate db:structure:dump` structure_dump = File.read("db/structure.sql") assert_match(/CREATE TABLE \"books\"/, structure_dump) `bundle exec rake db:drop db:structure:load` @@ -148,8 +148,8 @@ module ApplicationTests def db_test_load_structure Dir.chdir(app_path) do - `rails generate model book title:string` - `bundle exec rake db:migrate db:structure:dump db:test:load_structure` + `rails generate model book title:string; + bundle exec rake db:migrate db:structure:dump db:test:load_structure` ActiveRecord::Base.configurations = Rails.application.config.database_configuration ActiveRecord::Base.establish_connection 'test' require "#{app_path}/app/models/book" |