Skip to content

Commit

Permalink
Fix a failing spec in fc65d16
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Jun 23, 2019
1 parent fc65d16 commit 536c0d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/uploader/cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,10 @@ def filename
expect(CarrierWave.generate_cache_id.split('-')[2].to_i).to eq(counter + 1)
end

it 'generates dir name with constant length even when counter has big value' do
length = CarrierWave.generate_cache_id.length
it 'generates dir name using constant length for the counter' do
allow(CarrierWave::CacheCounter).to receive(:increment).and_return(1234567890)

expect(CarrierWave.generate_cache_id.length).to eq(length)
expect(CarrierWave.generate_cache_id.split('-')[2].length).to eq(4)
end
end
end

0 comments on commit 536c0d3

Please sign in to comment.