diff options
Diffstat (limited to '')
| -rw-r--r-- | spec/build_spec.rb | 8 | ||||
| -rw-r--r-- | spec/loading_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/spec_helper.rb | 5 | 
3 files changed, 11 insertions, 4 deletions
| diff --git a/spec/build_spec.rb b/spec/build_spec.rb new file mode 100644 index 00000000..8e0d6ed8 --- /dev/null +++ b/spec/build_spec.rb @@ -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 diff --git a/spec/loading_spec.rb b/spec/loading_spec.rb index 459f0720..99d7fe29 100644 --- a/spec/loading_spec.rb +++ b/spec/loading_spec.rb @@ -1,7 +1,7 @@  require 'spec_helper'  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|      it "should parse .#{lang} file" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b2cd9a24..0048686d 100755 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,8 +1,7 @@  require 'vimrunner'  require 'vimrunner/rspec' -PLUGIN_PATH = File.expand_path('../..', __FILE__) -puts PLUGIN_PATH +$plugin_path = File.expand_path('../..', __FILE__)  Vimrunner::RSpec.configure do |config|    # 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      # 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.      vim | 
