On Tue, Dec 20, 2011 at 5:51 AM, Jarl Friis <j...@softace.dk> wrote: > Hi. > > Is there any matcher for test file content, anything like > > file("/path/to/file.txt").should contain("File content") > or > file("/path/to/file.txt").content.should == "File content" > or > file_content("/path/to/file.txt").should == "File content" > > or something else? > File.read("/path/to/file") will give you a string of the entire contents of the file.
File.read("/path/to/file").should match "content" File.read("/path/to/file").should include "content" etc. Does that help? Best, Michael Guterl _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users