Commit 861129c3 authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by James Edwards-Jones

Mock Dir::exist? in project_spec.rb

parent 06d96a9a
...@@ -1074,8 +1074,7 @@ describe Project, models: true do ...@@ -1074,8 +1074,7 @@ describe Project, models: true do
subject { project.pages_deployed? } subject { project.pages_deployed? }
context 'if public folder does exist' do context 'if public folder does exist' do
before { FileUtils.mkdir_p(project.public_pages_path) } before { allow(Dir).to receive(:exist?).with(project.public_pages_path).and_return(true) }
after { FileUtils.rmdir(project.public_pages_path) }
it { is_expected.to be_truthy } it { is_expected.to be_truthy }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment