File: spec_helper.rb

package info (click to toggle)
vim-command-t 5.0.2-5-g7147ba9-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 744 kB
  • sloc: ruby: 3,394; ansic: 1,177; makefile: 27; sh: 26; xml: 11
file content (30 lines) | stat: -rw-r--r-- 736 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright 2010-present Greg Hurrell. All rights reserved.
# Licensed under the terms of the BSD 2-clause license.

if !Object.const_defined?('Bundler')
  require 'rubygems'
  require 'bundler'
  Bundler.setup
end
require 'rspec'

ext = File.expand_path('../ruby/command-t/lib', File.dirname(__FILE__))
lib = File.expand_path('../ruby/command-t/ext', File.dirname(__FILE__))
$LOAD_PATH.unshift(ext) unless $LOAD_PATH.include?(ext)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'command-t'
require 'command-t/ext'

RSpec.configure do |config|
  config.mock_framework = :rr
end

# Fake top-level VIM implementation, for stubbing.
module VIM
  class << self
    def evaluate(*args); end
  end

  Buffer = Class.new
end