demarches-normaliennes/spec/uploaders/base_uploader_spec.rb

22 lines
505 B
Ruby
Raw Normal View History

2016-12-16 09:25:19 +01:00
require 'spec_helper'
describe BaseUploader do
let(:uploader) { described_class.new }
describe '#cache_dir' do
subject { uploader.cache_dir }
context 'when rails env is not production' do
it { is_expected.to eq '/tmp/tps-dev-cache' }
end
context 'when rails env is not production' do
before do
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))
end
it { is_expected.to eq '/tmp/tps-cache' }
end
end
2017-04-04 15:27:04 +02:00
end