diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-19 22:13:58 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-02-01 01:55:28 +0300 |
commit | 861129c33ae1a1c4c3122832033c838d4af5d88d (patch) | |
tree | 6113560ee8e14de193670ad02377dcd071ba7052 /spec/models | |
parent | 06d96a9a624d31294bdf16a4662aaa7121274061 (diff) |
Mock Dir::exist? in project_spec.rb
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 558674b5b39..591ea314142 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1074,8 +1074,7 @@ describe Project, models: true do subject { project.pages_deployed? } context 'if public folder does exist' do - before { FileUtils.mkdir_p(project.public_pages_path) } - after { FileUtils.rmdir(project.public_pages_path) } + before { allow(Dir).to receive(:exist?).with(project.public_pages_path).and_return(true) } it { is_expected.to be_truthy } end |