Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.682 kb
require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'fakeweb'
require 'mocha'
require 'helpers/output'
require 'pathname'
dir = Pathname(__FILE__).join('..', '..', 'lib')
require dir.join('gemwhois').expand_path
require dir.join('rubygems', 'commands', 'whois_command').expand_path
FakeWeb.allow_net_connect = false
class Test::Unit::TestCase
include Helpers::Output
def stub_gem(gem_name, options={})
FakeWeb.register_uri(:get, "https://rubygems.org/api/v1/gems/#{gem_name}.json", options.merge(:body => fixture_file(gem_name)))
end
def fixture_file(gem_name)
File.read(File.join(File.dirname(__FILE__), 'fixtures', "#{gem_name}.json"))
end
end
Jump to Line
Something went wrong with that request. Please try again.