Sha256: 825bf9d58f12c10e9ec280a07e75fc29ce33e3d930c5958425350e4f2f7aa7de
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
module NlmtWrappers class FakeInstaller def initialize @executables = [] end def install(executable) @executables << executable end def uninstall(executable) @executables.delete(executable) end def executables @executables.uniq end def ensure @ensure = true end def ensure? @ensure end def wrappers_path "/path/to/wrappers" end end class FakeEnvironment def ensure @ensure = true end def ensure? @ensure end def file_name "/path/to/environment" end end class Fake def initialize(gems) @gems = gems @executables = [] end def install(executables) @executables += executables end def uninstall(executables) @executables -= executables end def executables @executables end def environment_file "/path/to/environment" end def wrappers_path "/path/to/wrappers" end def wrapper_path(exe) file = File.join(wrappers_path, exe) if @gems.include?(exe) file else raise NlmtWrappers::NoWrapper, "No wrapper: #{file}" end end def installed_wrappers @gems end def gems_executables @gems end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nlmt-wrappers-0.0.1 | test/gem-wrappers/fakes.rb |