# Using 'get' in rspec controller test, doesn't work with array value for parameter

**URL:** <https://www.ruby-forum.com/t/using-get-in-rspec-controller-test-doesnt-work-with-array-value-for-parameter/173104>\
**Category:** Rails\
**Created:** [August 2, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/using-get-in-rspec-controller-test-doesnt-work-with-array-value-for-parameter/173104 "2009-08-02T20:53:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonybaker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c68b51/32.png) [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Post date:** [August 2, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/using-get-in-rspec-controller-test-doesnt-work-with-array-value-for-parameter/173104/1 "2009-08-02T20:53:45Z")

</div>

This may be the wrong forum for this, but I think I’ll ask here anyway  
because the method in question is one of Rails integration testing  
methods and not actually implemented by rspec.

I’m trying to spec the retrieve action of my AssetsController, which  
takes a wildcard route of the form “/assets/\*path”. I’m trying to test  
it like so:

it “should render the correct text asset with the correct MIME type  
and encoding” do  
get “retrieve”, { :path =\> [‘stylesheets’, ‘bar.css’] }  
end

This fails with the error “undefined method `each’ for  
“stylesheets”:String”. I have a feeling that this is a dumb mistake  
somehow and I’m just not using the method correctly. Any insight on my  
possible stupidity would be greatly appreciated.
