File: mount_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 (17 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
When /^I assign the file '([^\']*)' to the '([^\']*)' column$/ do |path, column|
  @instance.send("#{column}=", File.open(file_path(path)))
end

Given /^the uploader class is mounted on the '([^\']*)' column$/ do |column|
  @mountee_klass.mount_uploader column.to_sym, @klass
end

When /^I retrieve the file later from the cache name for the column '([^\']*)'$/ do |column|
  new_instance = @instance.class.new
  new_instance.send("#{column}_cache=", @instance.send("#{column}_cache"))
  @instance = new_instance
end

Then /^the url for the column '([^\']*)' should be '([^\']*)'$/ do |column, url|
  @instance.send("#{column}_url").should == url
end