carrierwave 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of carrierwave might be problematic. Click here for more details.

@@ -19,9 +19,9 @@ describe CarrierWave::Uploader do
19
19
  @stored_file.stub!(:path).and_return('/path/to/somewhere')
20
20
  @stored_file.stub!(:url).and_return('http://www.example.com')
21
21
  @stored_file.stub!(:identifier).and_return('this-is-me')
22
+ @stored_file.stub!(:delete)
22
23
 
23
24
  @uploader_class.storage.stub!(:store!).and_return(@stored_file)
24
- @uploader_class.storage.stub!(:destroy!)
25
25
  @uploader.store!(@file)
26
26
  end
27
27
 
@@ -46,8 +46,8 @@ describe CarrierWave::Uploader do
46
46
  @uploader.identifier.should be_nil
47
47
  end
48
48
 
49
- it "should instruct the storage engine to remove the file" do
50
- @uploader_class.storage.should_receive(:destroy!).with(@uploader, @uploader.file)
49
+ it "should delete the file" do
50
+ @stored_file.should_receive(:delete)
51
51
  @uploader.remove!
52
52
  end
53
53
 
@@ -206,11 +206,8 @@ describe CarrierWave::Uploader do
206
206
  @uploader_class.storage.stub!(:store!).and_return(@base_stored_file)
207
207
  @uploader_class.version(:thumb).storage.stub!(:store!).and_return(@thumb_stored_file)
208
208
 
209
- @uploader_class.storage.stub!(:store!).and_return(@base_stored_file)
210
- @uploader_class.version(:thumb).storage.stub!(:store!).and_return(@thumb_stored_file)
211
-
212
- @uploader_class.storage.stub!(:destroy!)
213
- @uploader_class.version(:thumb).storage.stub!(:destroy!)
209
+ @base_stored_file.stub!(:delete)
210
+ @thumb_stored_file.stub!(:delete)
214
211
 
215
212
  @uploader.store!(@file)
216
213
  end
@@ -231,9 +228,9 @@ describe CarrierWave::Uploader do
231
228
  @uploader.thumb.url.should be_nil
232
229
  end
233
230
 
234
- it "should instruct the storage engine to remove the file and its versions" do
235
- @uploader_class.storage.should_receive(:destroy!).with(@uploader, @uploader.file)
236
- @uploader_class.version(:thumb).storage.should_receive(:destroy!).with(@uploader.thumb, @uploader.thumb.file)
231
+ it "should delete all the files" do
232
+ @base_stored_file.should_receive(:delete)
233
+ @thumb_stored_file.should_receive(:delete)
237
234
  @uploader.remove!
238
235
  end
239
236
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-13 00:00:00 +02:00
12
+ date: 2009-06-11 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15