diff --git a/spec/filewatch/buftok_spec.rb b/spec/filewatch/buftok_spec.rb index c27cccb..4e43335 100644 --- a/spec/filewatch/buftok_spec.rb +++ b/spec/filewatch/buftok_spec.rb @@ -5,13 +5,13 @@ context "when using the default delimiter" do it "splits the lines correctly" do - expect(subject.extract("hello\nworld\n")).to eq ["hello", "world"] + expect(subject.extract("hello\nworld\n").to_a).to eq ["hello", "world"] end it "holds partial lines back until a token is found" do buffer = described_class.new - expect(buffer.extract("hello\nwor")).to eq ["hello"] - expect(buffer.extract("ld\n")).to eq ["world"] + expect(buffer.extract("hello\nwor").to_a).to eq ["hello"] + expect(buffer.extract("ld\n").to_a).to eq ["world"] end end @@ -19,7 +19,7 @@ subject { FileWatch::BufferedTokenizer.new("\r\n") } it "splits the lines correctly" do - expect(subject.extract("hello\r\nworld\r\n")).to eq ["hello", "world"] + expect(subject.extract("hello\r\nworld\r\n").to_a).to eq ["hello", "world"] end end end