Sha256: c5197777a1507a3dad1b7b6378aecb0445bbbda14afd03f63cf0be5e2f41977b

Contents?: true

Size: 1 KB

Versions: 15

Compression:

Stored size: 1 KB

Contents

require 'minitest/autorun'

require 'shoulda'

# for some reasons the refute_predicate is missing when executing
# via jruby-1.7.4
module ActiveSupport
  class TestCase < ::MiniTest::Unit::TestCase
    def refute_predicate
    end
  end
end

require 'active_support'
require 'active_support/test_case'
require 'webmock'
require 'rr'

begin
  require 'redgreen'
rescue LoadError
end

WebMock.disable_net_connect!

$:.unshift File.expand_path(File.join(File.dirname(__FILE__), ".."))

require "rubygems_plugin"

class CommandTest < ActiveSupport::TestCase
  include WebMock::API
  include ShouldaContextLoadable 

  def teardown
    WebMock.reset!
  end
end

def stub_config(config)
  file = Gem::ConfigFile.new({})
  config.each { |key, value| file[key] = value }
  stub(Gem).configuration { config }
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

15 entries across 15 versions & 2 rubygems

Version Path
nexus-debug-1.4.6 test/command_helper.rb
nexus-debug-1.4.5 test/command_helper.rb
nexus-debug-1.4.4 test/command_helper.rb
nexus-debug-1.4.3 test/command_helper.rb
nexus-debug-1.4.2 test/command_helper.rb
nexus-debug-1.4.1 test/command_helper.rb
nexus-debug-1.4.0 test/command_helper.rb
nexus-1.4.0 test/command_helper.rb
nexus-1.3.0 test/command_helper.rb
nexus-1.2.3 test/command_helper.rb
nexus-1.2.1 test/command_helper.rb
nexus-1.2.0 test/command_helper.rb
nexus-1.1.0 test/command_helper.rb
nexus-1.0.1 test/command_helper.rb
nexus-1.0.0 test/command_helper.rb