features/support/env.rb in bookingit-0.0.1 vs features/support/env.rb in bookingit-0.1.0
- old
+ new
@@ -6,14 +6,18 @@
Before do
# Using "announce" causes massive warnings on 1.9.2
@puts = true
@original_rubylib = ENV['RUBYLIB']
@files_created = []
+ @dirs_created = []
ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
end
After do
ENV['RUBYLIB'] = @original_rubylib
@files_created.each do |file|
- FileUtils.rm file
+ FileUtils.rm file if File.exists?(file)
+ end
+ @dirs_created.each do |dir|
+ FileUtils.rm_rf dir if File.exists?(dir)
end
end