Re: [rspec-users] Problem with RSpec, Rails or Me? (I know the answer is me!!)

2011-12-20 Thread Ants Pants
On 19 December 2011 21:32, Ants Pants wrote: > > > On 19 December 2011 20:45, Pat Maddox wrote: > >> On Dec 19, 2011, at 11:00 AM, Ants Pants wrote: >> >> > This could just be my lack of knowledge of how Rails works but from the >> following code in my RSpec test >> > >> > $stderr.puts "BEF

[rspec-users] Matcher for testing file content.

2011-12-20 Thread Jarl Friis
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? Jarl

Re: [rspec-users] Matcher for testing file content.

2011-12-20 Thread Michael Guterl
On Tue, Dec 20, 2011 at 5:51 AM, Jarl Friis 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 == "

Re: [rspec-users] Matcher for testing file content.

2011-12-20 Thread Jarl Friis
Yes, that certainly did the trick... I use File.read("/path/to/file").should == "content" Thanks. 2011/12/20 Michael Guterl : > On Tue, Dec 20, 2011 at 5:51 AM, Jarl Friis wrote: >> Hi. >> >> Is there any matcher for test file content, anything like >> >> file("/path/to/file.txt").should conta