aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/initializers
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-08 19:32:41 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-08 19:57:17 -0300
commit73e8e70066310db4950a330c9a8593ae031041d2 (patch)
tree0d9b780320a7e3d5a9c7c1c73de78cba94d64a14 /railties/test/application/initializers
parent8a714c4d804d2502c4b1bdfccb3e9175c4add7b8 (diff)
downloadrails-73e8e70066310db4950a330c9a8593ae031041d2.tar.gz
rails-73e8e70066310db4950a330c9a8593ae031041d2.tar.bz2
rails-73e8e70066310db4950a330c9a8593ae031041d2.zip
Use one system call whenever possible, group rake and Dir.chdir calls
Diffstat (limited to 'railties/test/application/initializers')
-rw-r--r--railties/test/application/initializers/frameworks_test.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb
index a0e88cd0f0..8224b20d90 100644
--- a/railties/test/application/initializers/frameworks_test.rb
+++ b/railties/test/application/initializers/frameworks_test.rb
@@ -196,9 +196,8 @@ module ApplicationTests
test "use schema cache dump" do
Dir.chdir(app_path) do
- `rails generate model post title:string`
- `bundle exec rake db:migrate`
- `bundle exec rake db:schema:cache:dump`
+ `rails generate model post title:string;
+ bundle exec rake db:migrate db:schema:cache:dump`
end
require "#{app_path}/config/environment"
ActiveRecord::Base.connection.drop_table("posts") # force drop posts table for test.
@@ -207,17 +206,13 @@ module ApplicationTests
test "expire schema cache dump" do
Dir.chdir(app_path) do
- `rails generate model post title:string`
- `bundle exec rake db:migrate`
- `bundle exec rake db:schema:cache:dump`
-
- `bundle exec rake db:rollback`
+ `rails generate model post title:string;
+ bundle exec rake db:migrate db:schema:cache:dump db:rollback`
end
silence_warnings {
require "#{app_path}/config/environment"
assert !ActiveRecord::Base.connection.schema_cache.tables["posts"]
}
end
-
end
end