Created
February 16, 2012 11:39
-
-
Save nuna/1844266 to your computer and use it in GitHub Desktop.
factory_girl + Rails 3.2.1 / legacy fanctional test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FactoryGirl::TestHelper | |
include ActionDispatch::TestProcess | |
def self.fixture_file_upload(*args) | |
self.new.fixture_file_upload(*args) | |
end | |
def self.fixture_path | |
File.join(File.dirname(__FILE__) + '/fixtures/') | |
end | |
end | |
Factory.define :file do |f| | |
f.asset { FactoryGirl::TestHelper.fixture_file_upload('/files/logo.png', 'image/png', true) } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment