I want to create this scenario
Given I have tracks titled Mama, We will rock you
And attach "test.mp3"
Given /^attach "([^\"]*)" as (.+) $/ do |file,attr|
full_file_path = File.join(RAILS_ROOT, 'features', 'upload-files',
filename)
file = File.new(full_file_path)
content_type = file.content_type
model().send("#attr=", file)
end
How would I refer to the last created (list of) model(s)?
Thanks,
Phil