summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJon Cairns <jon@joncairns.com>2013-06-17 14:08:21 +0100
committerJon Cairns <jon@joncairns.com>2013-06-17 14:08:21 +0100
commit9faf3ae878d757140b77574efbed051f30af977f (patch)
tree697988dc76900de80299e8882a69427c447eb1c7 /spec
parent2fdfff39e5885c9be1fe6719100d20894957f606 (diff)
downloadvdebug-9faf3ae878d757140b77574efbed051f30af977f.zip
Add integration spec for starting a tcp socket server
Diffstat (limited to 'spec')
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/startup_spec.rb15
2 files changed, 16 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0ceb7ef..d1142d1 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -4,7 +4,7 @@ require 'vimrunner/rspec'
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
+ config.reuse_server = false
# Decide how to start a Vim instance. In this block, an instance should be
# spawned and set up with anything project-specific.
diff --git a/spec/startup_spec.rb b/spec/startup_spec.rb
new file mode 100644
index 0000000..c3bf42c
--- /dev/null
+++ b/spec/startup_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+require 'socket'
+
+describe "startup" do
+ context "starting the debugger" do
+ before { vim.server.remote_send ':python debugger.run()<CR>' }
+
+ # Try and connect via tcp socket
+ it "should create a tcp server socket" do
+ expect { TCPSocket.new('localhost', 9000).close }.not_to raise_error
+ end
+
+ after { vim.command 'python debugger.close()' }
+ end
+end