Skip to content
Browse files

Don't define @@tmp_prefix at the top level when running specs, silenc…

…ing a ruby-2.0 warning.
  • Loading branch information...
1 parent d84f115 commit 49420a2b248f29347412fb6e10a9dcc0db91d463 @benhoskings committed
Showing with 9 additions and 3 deletions.
  1. +9 −3 spec/spec_helper.rb
View
12 spec/spec_helper.rb
@@ -11,12 +11,18 @@
puts "babushka@#{`git rev-parse --short HEAD`.strip} | ruby-#{RUBY_VERSION} | rspec-#{RSpec::Version::STRING}"
def tmp_prefix
- @@tmp_prefix ||= "/#{File.symlink?('/tmp') ? File.readlink('/tmp') : 'tmp'}/from_babushka_specs".tap {|path|
- path.p.rm.mkdir
- }
+ Babushka::Specs.tmp_prefix
end
module Babushka
+ module Specs
+ def self.tmp_prefix
+ @tmp_prefix ||= "/#{File.symlink?('/tmp') ? File.readlink('/tmp') : 'tmp'}/from_babushka_specs".tap {|path|
+ path.p.rm.mkdir
+ }
+ end
+ end
+
class Asset
def build_prefix
tmp_prefix / 'archives'

0 comments on commit 49420a2

Please sign in to comment.
Something went wrong with that request. Please try again.