penchant/features/support/env.rb

28 lines
308 B
Ruby
Raw Normal View History

require 'fakefs/safe'
require 'penchant'
2012-06-06 15:20:02 +00:00
require 'mocha'
World(Mocha::API)
Before('@fakefs') do
FakeFS.activate!
end
2012-06-06 15:20:02 +00:00
Before('@mocha') do
mocha_setup
end
After do
2012-06-05 12:20:48 +00:00
FakeFS::FileSystem.clear
FakeFS.deactivate!
2012-06-06 15:20:02 +00:00
begin
mocha_verify
ensure
mocha_teardown
end
FileUtils.rm_rf 'tmp'
end