We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60a7d5b commit 4186ffcCopy full SHA for 4186ffc
1 file changed
spec/image_optim/cache_spec.rb
@@ -15,7 +15,9 @@
15
16
let(:cache_dir) do
17
dir = '/somewhere/cache'
18
- allow(FileUtils).to receive(:mkpath).with(Regexp.new(Regexp.escape(dir)), any_args)
+ allow(Dir).to receive(:mkdir).with(File.dirname(dir))
19
+ allow(Dir).to receive(:mkdir).with(dir)
20
+ allow(Dir).to receive(:mkdir).with(%r{\A#{Regexp.escape(dir)}/[^/]+\z})
21
allow(FileUtils).to receive(:touch)
22
allow(FSPath).to receive(:temp_file_path) do
23
tmp_file
0 commit comments