aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/rake/dev_test.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-09-04 02:25:26 +0930
committerMatthew Draper <matthew@trebex.net>2017-09-04 20:19:39 +0930
commit802ce8a2392d3f749e665d4f9e54790cf613aaf9 (patch)
treec918e029aabc60a84afe7714030e35e81dffc0ec /railties/test/application/rake/dev_test.rb
parent07bac9ef93d98a1e31cd5b2ce2aabc1e57816604 (diff)
downloadrails-802ce8a2392d3f749e665d4f9e54790cf613aaf9.tar.gz
rails-802ce8a2392d3f749e665d4f9e54790cf613aaf9.tar.bz2
rails-802ce8a2392d3f749e665d4f9e54790cf613aaf9.zip
Run in-app rails commands via fork+load where possible
While this avoids shell argument parsing, we still pass through everything in our stack.
Diffstat (limited to 'railties/test/application/rake/dev_test.rb')
-rw-r--r--railties/test/application/rake/dev_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/application/rake/dev_test.rb b/railties/test/application/rake/dev_test.rb
index b25593ee1c..66e1ac9d99 100644
--- a/railties/test/application/rake/dev_test.rb
+++ b/railties/test/application/rake/dev_test.rb
@@ -17,7 +17,7 @@ module ApplicationTests
test "dev:cache creates file and outputs message" do
Dir.chdir(app_path) do
- output = `rails dev:cache`
+ output = rails("dev:cache")
assert File.exist?("tmp/caching-dev.txt")
assert_match(/Development mode is now being cached/, output)
end
@@ -25,8 +25,8 @@ module ApplicationTests
test "dev:cache deletes file and outputs message" do
Dir.chdir(app_path) do
- `rails dev:cache` # Create caching file.
- output = `rails dev:cache` # Delete caching file.
+ rails "dev:cache" # Create caching file.
+ output = rails("dev:cache") # Delete caching file.
assert_not File.exist?("tmp/caching-dev.txt")
assert_match(/Development mode is no longer being cached/, output)
end
@@ -34,12 +34,12 @@ module ApplicationTests
test "dev:cache touches tmp/restart.txt" do
Dir.chdir(app_path) do
- `rails dev:cache`
+ rails "dev:cache"
assert File.exist?("tmp/restart.txt")
prev_mtime = File.mtime("tmp/restart.txt")
sleep(1)
- `rails dev:cache`
+ rails "dev:cache"
curr_mtime = File.mtime("tmp/restart.txt")
assert_not_equal prev_mtime, curr_mtime
end