Sha256: 54db5c5d362ff63e7860b099a5c3dac004c7d568d8550a6366c32bc25ab0e0d8

Contents?: true

Size: 888 Bytes

Versions: 1

Compression:

Stored size: 888 Bytes

Contents

require 'rubygems'
require 'test/unit'

require 'shoulda'
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 RR::Adapters::TestUnit unless include?(RR::Adapters::TestUnit)
  include WebMock::API

  def teardown
    WebMock.reset!
  end
end

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

1 entries across 1 versions & 1 rubygems

Version Path
nexus-0.1.0 test/command_helper.rb