File: store_steps.rb

package info (click to toggle)
ruby-carrierwave 1.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,692 kB
  • sloc: ruby: 9,881; sh: 26; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Given /^the file '(.*?)' is stored at '(.*?)'$/ do |file, stored|
  FileUtils.mkdir_p(File.dirname(file_path(stored)))
  FileUtils.cp(file_path(file), file_path(stored))
end

When /^I store the file$/ do
  @uploader.store!
end

When /^I store the file '(.*?)'$/ do |file|
  @uploader.store!(File.open(file_path(file)))
end

When /^I retrieve the file '(.*?)' from the store$/ do |identifier|
  @uploader.retrieve_from_store!(identifier)
end