[rspec-users] RSpec-Rails 1.2.2 and Controllers without views - what to do?

Bira u.alberton at gmail.com
Wed Apr 1 15:40:42 EDT 2009

I'm trying to upgrade to RSpec 1.2.2 in a Rails app, and reading
Upgrade.rdoc I see that now every controller action must have a
corresponding template for their specs to pass. However, we have a few
controllers which only return XML or JSON as generated by Rails'
to_xml and to_json methods, and so use only render :xml/:json calls
rather than views. With 1.2.2, we get a lot of failing specs in that
section that used to pass with 1.1.12, because of the "missing"

What do you recommend I do in this case? Is there any good solution
other than making up templates consisting entirely of a single "<%=
@obj.to_xml %>" line?


More information about the rspec-users mailing list