File: download_steps.rb

package info (click to toggle)
ruby-carrierwave 0.10.0%2Bgh-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,200 kB
  • ctags: 531
  • sloc: ruby: 7,180; sh: 26; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 332 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
When /^I download the file '([^']+)'/ do |url|
  unless ENV['REMOTE'] == 'true'
    sham_rack_app = ShamRack.at('s3.amazonaws.com').stub
    sham_rack_app.register_resource('/Monkey/testfile.txt', 'S3 Remote File', 'text/plain')
  end

  @uploader.download!(url)

  unless ENV['REMOTE'] == 'true'
    ShamRack.unmount_all
  end
end