diff options
Diffstat (limited to 'spec/support/helpers.rb')
-rw-r--r-- | spec/support/helpers.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index bd28b975b0..c17a92c363 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -137,8 +137,7 @@ module Spec @out end - def config(config = nil) - path = bundled_app('.bundle/config') + def config(config = nil, path = bundled_app('.bundle/config')) return YAML.load_file(path) unless config FileUtils.mkdir_p(File.dirname(path)) File.open(path, 'w') do |f| @@ -147,6 +146,10 @@ module Spec config end + def global_config(config = nil) + config(config, home(".bundle/config")) + end + def create_file(*args) path = bundled_app(args.shift) path = args.shift if args.first.is_a?(Pathname) |