Skip to content

Commit

Permalink
Clarify the need to run command twice.
Browse files Browse the repository at this point in the history
We had 2 pull requests erronously trying to remove the first command.
Add some comments for clarity.
  • Loading branch information
kaspth committed Dec 7, 2015
1 parent 3979403 commit 2af9c08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/test/commands/dev_cache_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def teardown

test 'dev:cache deletes file and outputs message' do
Dir.chdir(app_path) do
output = `rails dev:cache`
output = `rails dev:cache`
`rails dev:cache` # Create caching file.

This comment has been minimized.

Copy link
@fxn

fxn Dec 7, 2015

Member

Backticks are used when you want to capture the output, otherwise system is more concise. Kind of similar to map vs each: map iterates and builds a collection, if you are not interested in the collection then you use each.

This comment has been minimized.

Copy link
@kaspth

kaspth Dec 7, 2015

Author Contributor

Ah, thanks! I'll remember that next time 😁

output = `rails dev:cache` # Delete caching file.
assert_not File.exist?('tmp/caching-dev.txt')
assert_match(%r{Development mode is no longer being cached}, output)
end
Expand Down

0 comments on commit 2af9c08

Please sign in to comment.