[rspec-users] Speccing Rack middleware rack-cors
haarts
harmaarts at gmail.com
Thu Jan 19 09:08:03 EST 2012
Dear all,
I'd love to spec a piece of Rack middleware I'm using a project. It's
middleware providing CORS functionality (https://github.com/cyu/rack-cors ,
0.2.4). The middleware seems to work when I'm cURLing but I can't seem to
get it to work with Rspec (2.8.0) and Rails (3.1.3). It looks like the
middleware is bypassed entirely.
I tried setting the headers via 'request.env["Origin"] = "*"' and sending
it as a third argument to 'get'. See Gist, https://gist.github.com/1640182,
for the nicely formatted code. Nothing seems to work. What am I doing wrong?
With kind regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120119/35ddaba7/attachment.html>
More information about the rspec-users
mailing list