Class: LocalPac::FileServeController::SpecHelperFileServer
- Inherits:
-
Object
- Object
- LocalPac::FileServeController::SpecHelperFileServer
- Includes:
- SpecHelper::GitHelper
- Defined in:
- lib/local_pac/spec_helper_file_server.rb
Instance Method Summary collapse
-
#initialize ⇒ SpecHelperFileServer
constructor
A new instance of SpecHelperFileServer.
Constructor Details
#initialize ⇒ SpecHelperFileServer
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/local_pac/spec_helper_file_server.rb', line 9 def initialize LocalPac.ui_logger.level = ::Logger::UNKNOWN config = Class.new do include FeduxOrg::Stdlib::Filesystem def root_directory ::File.('../../../', __FILE__) end def local_storage ::File.join(working_directory, 'git_repo', '.git') end end.new LocalPac.config(config) valid_pac_file = "function FindProxyForURL(url, host) {\n return \"DIRECT\";\n}\n" git_repo = 'git_repo' FileUtils.rm_rf ::File.join(working_directory, git_repo) git_init(git_repo) (git_repo) create_file(::File.join(git_repo, 'file.pac'), valid_pac_file) git_add(git_repo, 'file.pac') git_commit(git_repo) end |