File: fix_current_window_test.patch

package info (click to toggle)
ruby-neovim 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 396 kB
  • ctags: 280
  • sloc: ruby: 3,389; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 992 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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