# Rspec & attachment\_fu

**URL:** <https://www.ruby-forum.com/t/rspec-attachment-fu/140227>\
**Category:** Rails\
**Created:** [June 12, 2008, 1:45am UTC](https://www.ruby-forum.com/t/rspec-attachment-fu/140227 "2008-06-12T01:45:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_tibs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Post date:** [June 12, 2008, 1:45am UTC](https://www.ruby-forum.com/t/rspec-attachment-fu/140227/1 "2008-06-12T01:45:12Z")

</div>

Hi,

Did anyone attempt to use rspec and attachment\_fu? How can I pass a  
file to attachment\_fu? What do I need to stub?

Thanks,  
Tiberiu

---

<div class="post-metadata">

**Author:** ![mr\_tibs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/439d5e/32.png) [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Post date:** [June 12, 2008, 2:15am UTC](https://www.ruby-forum.com/t/rspec-attachment-fu/140227/2 "2008-06-12T02:15:38Z")

</div>

Use { :uploaded\_data =\>  
fixture\_file\_upload(filename\_in\_fixtures\_directory) } in the params of  
the post action
