search for: fakefs

Displaying 3 results from an estimated 3 matches for "fakefs".

2009 Nov 02
0
testing Rake tasks with FakeFS
Jake Benilov wrote: > Hello Ben, > Hi Jake, I hope you don''t mind but I am copying this response to the rspec-users list in case any one else is able to shed more light on it. > I have a bit of a newbie question regarding fakefs; I want to test Rake > tasks using fakefs and rspec: > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > require ''fakefs/safe'' > require ''rake'' > require ''spec'' > > task :create_file do > touch "/abc" >...
2010 Nov 07
2
Hooks before a scenario but not the background: possible or bad practice
Hi, I''d like to activate FakeFS for some scenarios, which I tag @fakefs, however it seems Before(''@fakefs'') runs before the background of the feature - unfortunately this clobbers Grit, and I can''t Grit::Repo.new(...) in the backbround. Is it currently possible to get a hook to run before a scenario, bu...
2011 Dec 05
5
Spec'ing a block
Hi folks How would you spec something like this: as_user username do FileUtils.chmod_R 0755, "#{directory}/*" end Where as_user fires off a new process (and set uid to username). It seems that this won''t catch FileUtils.chmod_R: FileUtils.should_receive(:chmod_R).with(0755, "#{@domain.directory}/*") I guess that is because it is passed in the block