Add simple spec for build script
This commit is contained in:
parent
4bf3f6c300
commit
0ac0389039
8
spec/build_spec.rb
Normal file
8
spec/build_spec.rb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
$plugin_path = File.expand_path('../..', __FILE__)
|
||||||
|
|
||||||
|
describe 'build script' do
|
||||||
|
it 'should run and return success code' do
|
||||||
|
Dir.chdir($plugin_path)
|
||||||
|
system('./build')
|
||||||
|
end
|
||||||
|
end
|
@ -1,7 +1,7 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe "My Vim plugin" do
|
describe "My Vim plugin" do
|
||||||
languages = Dir["#{PLUGIN_PATH}/syntax/*.vim"].map { |f| f.split('/').last.gsub('.vim', '') }
|
languages = Dir["#{$plugin_path}/syntax/*.vim"].map { |f| f.split('/').last.gsub('.vim', '') }
|
||||||
|
|
||||||
languages.each do |lang|
|
languages.each do |lang|
|
||||||
it "should parse .#{lang} file" do
|
it "should parse .#{lang} file" do
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
require 'vimrunner'
|
require 'vimrunner'
|
||||||
require 'vimrunner/rspec'
|
require 'vimrunner/rspec'
|
||||||
|
|
||||||
PLUGIN_PATH = File.expand_path('../..', __FILE__)
|
$plugin_path = File.expand_path('../..', __FILE__)
|
||||||
puts PLUGIN_PATH
|
|
||||||
|
|
||||||
Vimrunner::RSpec.configure do |config|
|
Vimrunner::RSpec.configure do |config|
|
||||||
# Use a single Vim instance for the test suite. Set to false to use an
|
# Use a single Vim instance for the test suite. Set to false to use an
|
||||||
@ -15,7 +14,7 @@ Vimrunner::RSpec.configure do |config|
|
|||||||
vim = Vimrunner.start
|
vim = Vimrunner.start
|
||||||
|
|
||||||
# Setup your plugin in the Vim instance
|
# Setup your plugin in the Vim instance
|
||||||
vim.add_plugin(PLUGIN_PATH)
|
vim.add_plugin($plugin_path)
|
||||||
|
|
||||||
# The returned value is the Client available in the tests.
|
# The returned value is the Client available in the tests.
|
||||||
vim
|
vim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user