diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rwxr-xr-x | spec/spec_helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100755 index 00000000..b2cd9a24 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,23 @@ +require 'vimrunner' +require 'vimrunner/rspec' + +PLUGIN_PATH = File.expand_path('../..', __FILE__) +puts PLUGIN_PATH + +Vimrunner::RSpec.configure do |config| + # Use a single Vim instance for the test suite. Set to false to use an + # instance per test (slower, but can be easier to manage). + config.reuse_server = true + + # Decide how to start a Vim instance. In this block, an instance should be + # spawned and set up with anything project-specific. + config.start_vim do + vim = Vimrunner.start + + # Setup your plugin in the Vim instance + vim.add_plugin(PLUGIN_PATH) + + # The returned value is the Client available in the tests. + vim + end +end |