File: caching_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 (12 lines) | stat: -rw-r--r-- 387 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
Given /^the file '(.*?)' is cached file at '(.*?)'$/ do |file, cached|
  FileUtils.mkdir_p(File.dirname(file_path(cached)))
  FileUtils.cp(file_path(file), file_path(cached))
end

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

When /^I retrieve the cache name '(.*?)' from the cache$/ do |name|
  @uploader.retrieve_from_cache!(name)
end