[rspec-users] Speccing Rack middleware rack-cors
harmaarts at gmail.com
Thu Jan 19 09:08:03 EST 2012
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...
More information about the rspec-users