Sha256: d1f6523bf150d66740dec320d1fbfd53dec234a707ecc589034d10d3f77ed5df

Contents?: true

Size: 934 Bytes

Versions: 9

Compression:

Stored size: 934 Bytes

Contents

$:.unshift File.expand_path('..', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)
require 'rubygems'
require 'rubygems/commands/webhook_command'
require 'rubygems/commands/yank_command'
require 'test/unit'
require 'shoulda'
require 'active_support'
require 'active_support/test_case'
require 'webmock'
require 'rr'

WebMock.disable_net_connect!

class CommandTest < ActiveSupport::TestCase
  include RR::Adapters::TestUnit unless include?(RR::Adapters::TestUnit)
  include WebMock::API

  def teardown
    WebMock.reset!
  end
end

def stub_api_key(api_key)
  file = Gem::ConfigFile.new({})
  stub(file).rubygems_api_key { api_key }
  yield file if block_given?
  stub(Gem).configuration { file }
end

def assert_said(command, what)
  assert_received(command) do |command|
    command.say(what)
  end
end

def assert_never_said(command, what)
  assert_received(command) do |command|
    command.say(what).never
  end
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/gemcutter-0.7.1/test/helper.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/gemcutter-0.7.1/test/helper.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/gemcutter-0.7.1/test/helper.rb
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/gemcutter-0.7.1/test/helper.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/gemcutter-0.7.1/test/helper.rb
horseman-0.0.5 vendor/ruby/1.9.1/gems/gemcutter-0.7.1/test/helper.rb
horseman-0.0.4 vendor/ruby/1.9.1/gems/gemcutter-0.7.1/test/helper.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/gemcutter-0.7.1/test/helper.rb
gemcutter-0.7.1 test/helper.rb