spec/neovim/current_spec.rb in neovim-0.0.6 vs spec/neovim/current_spec.rb in neovim-0.1.0

- old
+ new

@@ -1,10 +1,10 @@ require "helper" module Neovim RSpec.describe Current do - let(:client) { Neovim.attach_child(["-n", "-u", "NONE"]) } + let(:client) { Neovim.attach_child(["nvim", "-n", "-u", "NONE"]) } let(:current) { client.current } describe "#line" do it "returns an empty string if the current line is empty" do expect(current.line).to eq("") @@ -130,9 +130,17 @@ end it "returns a Tabpage" do tp0 = current.tabpage expect(current.tabpage = tp0).to eq(tp0) + end + end + + describe "#range=" do + it "sets the line range of the current buffer" do + current.buffer.lines = ["one", "two", "three", "four"] + current.range = (1..2) + expect(current.buffer.range.to_a).to eq(["two", "three"]) end end end end