From 6ed635df885f2cbd5794de4cc523b3bdace9986d Mon Sep 17 00:00:00 2001
From: Alex Genco <alexgenco@gmail.com>
Date: Sun, 4 Dec 2016 19:22:09 -0800
Subject: [PATCH] Fix Current#window= spec to use relative indices

---
 spec/neovim/current_spec.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/neovim/current_spec.rb b/spec/neovim/current_spec.rb
index 823952d..6c78703 100644
--- a/spec/neovim/current_spec.rb
+++ b/spec/neovim/current_spec.rb
@@ -69,12 +69,12 @@ module Neovim
 
     describe "#window=" do
       it "sets the current window from an integer" do
+        start_index = current.window.index
         client.command("vsp")
-        expect(current.window.index).not_to eq(1)
 
         expect {
-          current.window = 1
-        }.to change { current.window.index }.to(1)
+          current.window = start_index
+        }.to change { current.window.index }.to(start_index)
       end
 
       it "sets the current window from a Window" do
