diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-05 15:21:38 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-05 15:24:49 +0100 |
commit | 18cde3b606ecc88a47a2a856de79db8482b5fb25 (patch) | |
tree | 241e85611f3e2b28be19712b8832423ad23c390b /spec/support | |
parent | 1daae58d9a139425d6a0a4d940b04ad3af08bb9f (diff) | |
download | bundler-18cde3b606ecc88a47a2a856de79db8482b5fb25.tar.gz |
Disallow folder changing helpers without a block
Since their naming leads to code that reads a bit weird without a block.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/path.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb index 9596724cc0..0c80fe5551 100644 --- a/spec/support/path.rb +++ b/spec/support/path.rb @@ -180,16 +180,16 @@ module Spec end end - def in_app_root(&blk) - Dir.chdir(bundled_app, &blk) + def in_app_root + Dir.chdir(bundled_app) { yield } end - def in_app_root2(&blk) - Dir.chdir(bundled_app2, &blk) + def in_app_root2 + Dir.chdir(bundled_app2) { yield } end - def in_repo_root(&blk) - Dir.chdir(root, &blk) + def in_repo_root + Dir.chdir(root) { yield } end extend self |