require 'aruba/cucumber' ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}" LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib') 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 if File.exists?(file) end @dirs_created.each do |dir| FileUtils.rm_rf dir if File.exists?(dir) end end