$:.unshift(File.expand_path(File.join(File.dirname(__FILE__),’..’,’file’)))
本文转自:http://www.cnblogs.com/watir/archive/2010/04/25/1719876.htmlrequire加载文件Postedon2010-04-2515:04Watir阅读(7)评论(0)编辑收藏所属分类:ruby加载文件时需要:require‘file’但是加载这个文件前需要有个上下文环境,如:$:.unshift(File.expand_path(Fil