File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 55
66 context "when using the default delimiter" do
77 it "splits the lines correctly" do
8- expect ( subject . extract ( "hello\n world\n " ) ) . to eq [ "hello" , "world" ]
8+ expect ( subject . extract ( "hello\n world\n " ) . to_a ) . to eq [ "hello" , "world" ]
99 end
1010
1111 it "holds partial lines back until a token is found" do
1212 buffer = described_class . new
13- expect ( buffer . extract ( "hello\n wor" ) ) . to eq [ "hello" ]
14- expect ( buffer . extract ( "ld\n " ) ) . to eq [ "world" ]
13+ expect ( buffer . extract ( "hello\n wor" ) . to_a ) . to eq [ "hello" ]
14+ expect ( buffer . extract ( "ld\n " ) . to_a ) . to eq [ "world" ]
1515 end
1616 end
1717
1818 context "when passing a custom delimiter" do
1919 subject { FileWatch ::BufferedTokenizer . new ( "\r \n " ) }
2020
2121 it "splits the lines correctly" do
22- expect ( subject . extract ( "hello\r \n world\r \n " ) ) . to eq [ "hello" , "world" ]
22+ expect ( subject . extract ( "hello\r \n world\r \n " ) . to_a ) . to eq [ "hello" , "world" ]
2323 end
2424 end
2525end
You can’t perform that action at this time.
0 commit comments