There's a conflict with Rabl::Engine.request_format when ActiveAdmin is installed.
The offending line in ActiveAdmin (https://github.com/gregbell/active_admin/blob/master/lib/active_admin/arbre/core_extensions.rb) causes the rabl engine to think it can respond to to_html, except that it just calls to_s, which returns "#<Rabl::Engine:0x007fa36b0de178>". This is really only an issue when you don't specify a request format.
An example output from my failing rspec:
1) api/users/me.rabl should return a valid user
Failure/Error: rendered.should == ''
got: "#<Rabl::Engine:0x007fa36b0de178>" (using ==)
# ./spec/views/api/user_spec.rb:16:in `block (2 levels) in <top (required)>'
I'm not sure how you want to proceed, but I thought you should be aware of this conflict.
For reference, my solution was to call Object.send :remove_method, :to_html in my spec_helper.rb
Object.send :remove_method, :to_html
Wow that core extension is fairly insane. They overwrite to_html on every single class?
Completely insane. I think I'll create a ticket in their project as well.
It's already been reported in ActiveAdmin and someone has a pull request in. See activeadmin/activeadmin#496
Glad to see someone has a sane pull request. Hilarious that it only requires changing two method calls and the monkeypatch becomes totally unnecessary.
It seems like this issue is not an issue with RABL and can be closed then, no/
Yep, agreed. Closing, hopefully that will be pulled in soon.