Module Gem::Mirror::TestSetup
In: lib/rubygems/mirror/test_setup.rb

Provide assistance for authors of code that utilises Gem::Mirror. The module defines several setup and teardown methods that can be used to provide a new gem source on disk.

Methods

Classes and Modules

Class Gem::Mirror::TestSetup::UI

Attributes

mirror_path  [R]  A temporary directory where mirrors might put their data
mirrorrc  [R]  An rcfile pointing at the source and mirror paths
mirrorrc_path  [R]  Path to the mock, temporary mirrorrc
source_gems  [R]  A list of gem names in the source_path
source_path  [R]  The path in which setup_gem_source will place a RubyGems source index
ui  [R]  An instance of TestSetup::UI, a mock UI for RubyGems.

Public Instance methods

Setup a new gem source directory containing a few gems suitable for testing mirrors, and place the path to that in source_path.

Setup a new mirrorrc for Gem::Mirror based on a setup from setup_gem_source.

Starts a server using Rack that will host the gem source

Setup a new mock UI using TestSetup::UI

Cleanup temporary directories that are created by setup_gem_source.

Cleanup tempfiles created by setup_mirrorrc.

Shutdown the local server hosting the source_path

Restore RubyGems default UI

[Validate]