Sha256: 88591f55dd659b4b6de718bc7e0ec0b02030d2e56836b3fdafb06a1ae00d3052

Contents?: true

Size: 1.36 KB

Versions: 7

Compression:

Stored size: 1.36 KB

Contents

require 'rubygems'
require 'bundler/setup'
Bundler.setup

require 'minitest/autorun'
require 'vcr'
require 'mocha/setup'
require 'wrong'

module Vendorificator
  module Spec
    module Helpers
      module Wrong
        include ::Wrong::Assert
        include ::Wrong::Helpers

        def increment_assertion_count
          self.assertions += 1
        end
      end
    end
  end
end

if ENV['COVERAGE']
  require 'simplecov'
  SimpleCov.start do
    add_filter '/spec/'
    add_group 'Vendors', 'lib/vendorificator/vendor'
    use_merging
  end
  SimpleCov.command_name 'rake spec'
end

require 'vendorificator'

VCR.configure do |config|
  config.cassette_library_dir = 'features/fixtures/vcr'
  config.default_cassette_options = { :record => :new_episodes }
  config.hook_into :webmock
end

class MiniTest::Spec
  include Vendorificator::Spec::Helpers::Wrong

  before do
    _git = stub('git')
    _capturing = stub('git.capturing')
    _git.stubs(:capturing).returns(_capturing)
    Vendorificator::Environment.any_instance.stubs(:git).returns(_git)
  end

  def conf
    @conf ||= Vendorificator::Config.new
  end

  def basic_environment
    @basic_environment ||= Vendorificator::Environment.new(
      Thor::Shell::Basic.new, :quiet, nil
    )
  end

  def includes_method?(obj, method)
    (obj.methods.include? method.to_sym) || (obj.methods.include? method.to_s)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vendorificator-0.6.0 spec/spec_helper.rb
vendorificator-0.5.3 spec/spec_helper.rb
vendorificator-0.5.2 spec/spec_helper.rb
vendorificator-0.5.1 spec/spec_helper.rb
vendorificator-0.5.0 spec/spec_helper.rb
vendorificator-0.5.git.v0.4.0.63.g8e9d54d spec/spec_helper.rb
vendorificator-0.5.git.v0.4.0.60.g9c35209 spec/spec_helper.rb