Ramaze.middleware :test do |m|
m.use Rack::Session::Cookie
m.use Rack::Accept
m.run Ramaze.core
end
Here's what's weird, my spec normally tests the json API using rake-test, then tests the html via capybara/rack-test. If I remove the json tests and just run the one spec (so only capybara tests are run) then it works.
If I reverse the order so html is tests first, then json, then the html passes and the json tests fail.
I do have a monkey patch on Innate::Node.find_provide that adds support for rake-accept. I'm looking into this now. But what I'm seeing so far is that once a route is hit with a given accept type, all subsequent hits on that url will have the action wish of the first access. What I mean is say the first GET '/' accept is 'application/json', then correctly the Action :wish => :json. Now say the next request is GET '/' accept => 'text/html', then incorrectly the action :wish => :json. Almost as if the wish is being cached instead of determined each time.
FYI, I added the monkey patch to my_controller.rb in the gist:
https://gist.github.com/4243452
Thank you,
Roy
> --
> You received this message because you are subscribed to the Google Groups "Ramaze" group.
> To post to this group, send email to
ram...@googlegroups.com.
> To unsubscribe from this group, send email to
ramaze+un...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/ramaze?hl=en.
>