spec/prawn/svg/loaders/file_spec.rb in prawn-svg-0.25.1 vs spec/prawn/svg/loaders/file_spec.rb in prawn-svg-0.25.2

- old
+ new

@@ -22,11 +22,11 @@ expect(File).to receive(:expand_path).with(".").and_return(fake_root_path) expect(File).to receive(:expand_path).with("relative/./path", fake_root_path).and_return("#{fake_root_path}/relative/path") expect(Dir).to receive(:exist?).with(fake_root_path).and_return(true) expect(File).to receive(:exist?).with("#{fake_root_path}/relative/path").and_return(true) - expect(IO).to receive(:read).with("#{fake_root_path}/relative/path").and_return("data") + expect(IO).to receive(:binread).with("#{fake_root_path}/relative/path").and_return("data") expect(subject).to eq 'data' end end @@ -37,11 +37,11 @@ expect(File).to receive(:expand_path).with(".").and_return(fake_root_path) expect(File).to receive(:expand_path).with(url, fake_root_path).and_return("/some/absolute/path") expect(Dir).to receive(:exist?).with(fake_root_path).and_return(true) expect(File).to receive(:exist?).with("/some/absolute/path").and_return(true) - expect(IO).to receive(:read).with("/some/absolute/path").and_return("data") + expect(IO).to receive(:binread).with("/some/absolute/path").and_return("data") expect(subject).to eq 'data' end end @@ -52,11 +52,11 @@ expect(File).to receive(:expand_path).with(".").and_return(fake_root_path) expect(File).to receive(:expand_path).with("/some/absolute/./path name", fake_root_path).and_return("/some/absolute/path name") expect(Dir).to receive(:exist?).with(fake_root_path).and_return(true) expect(File).to receive(:exist?).with("/some/absolute/path name").and_return(true) - expect(IO).to receive(:read).with("/some/absolute/path name").and_return("data") + expect(IO).to receive(:binread).with("/some/absolute/path name").and_return("data") expect(subject).to eq 'data' end end @@ -92,10 +92,10 @@ expect(File).to receive(:expand_path).with(".").and_return(fake_root_path) expect(File).to receive(:expand_path).with("c:/path/to/file.png", fake_root_path).and_return("c:/full/path/to/file.png") expect(Dir).to receive(:exist?).with(fake_root_path).and_return(true) expect(File).to receive(:exist?).with("c:/full/path/to/file.png").and_return(true) - expect(IO).to receive(:read).with("c:/full/path/to/file.png").and_return("data") + expect(IO).to receive(:binread).with("c:/full/path/to/file.png").and_return("data") allow(file_loader).to receive(:windows?).and_return true expect(subject).to eq 'data' end end