It doesn’t seem like my controller specs are calling my middleware on
requests. Has anyone figured out a good way to test middlware with
rspec?
I’m thinking something like
rails’ rails/actionpack/test/controller/session/mem_cache_store_test.rb
but
with rspec… any thoughts?
Thanks!
On Tue, Sep 22, 2009 at 12:22 AM, Aaron Gibralter [email protected] wrote:
It doesn’t seem like my controller specs are calling my middleware on
requests. Has anyone figured out a good way to test middlware with rspec?
Rack::Test is your friend:
If you Google it, there’s a fair amount of lore out there already on
using it in various contexts. (And yes, the methods it provides work
just as well in RSpec.)