Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 0.743 kB
require 'pomo'
require 'fakefs/safe'
# Taken from Aruba::Api
class Pomo::RSpecHelper
def self.set_env(key, value)
$original_env ||= {}
$original_env[key] = ENV.delete(key)
ENV[key] = value
end
def self.restore_env
$original_env ||= {}
$original_env.each do |key, value|
ENV[key] = value
end
end
end
RSpec.configure do |config|
config.color = true
config.order = 'random'
config.before(:suite) do
Pomo::RSpecHelper.set_env('POMO_ENV', 'test')
end
config.before(:each) do
FakeFS.activate!
FileUtils.mkdir_p ENV['HOME']
end
config.after(:each) do
FakeFS.deactivate!
FakeFS::FileSystem.clear
end
config.after(:suite) do
Pomo::RSpecHelper.restore_env
end
end
Jump to Line
Something went wrong with that request. Please try again.