Hey guys. One of my controller actions uses #render_to_string to send back a JSON response. When I try to spec this, Ruby raises a NoMethodError, saying that #render_to_string doesn''t exist in my controller action. Here''s the controller action, spec, and output: http://pastie.org/1640962 Any idea what I''m doing wrong? Thanks, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110306/6962b2ec/attachment-0001.html>
Bump. Any ideas? On Sunday, March 6, 2011 5:48:29 PM UTC-5, Nick wrote:> > Hey guys. One of my controller actions uses #render_to_string to send back > a JSON response. > > When I try to spec this, Ruby raises a NoMethodError, saying that > #render_to_string doesn''t exist in my controller action. > > Here''s the controller action, spec, and output: > http://pastie.org/1640962 > > Any idea what I''m doing wrong? Thanks, > Nick >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110309/c73d49a6/attachment.html>
I tried something similar and worked fine with or without render_views, so I really have no idea why you''re experiencing that. Please file a bug report to https://github.com/rspec/rspec-rails/issues and be sure to include version numbers of Ruby, Rails and RSpec. On Wed, Mar 9, 2011 at 9:39 PM, Nick <nick at deadorange.com> wrote:> Bump. Any ideas? > > > On Sunday, March 6, 2011 5:48:29 PM UTC-5, Nick wrote: >> >> Hey guys. One of my controller actions uses #render_to_string to send back >> a JSON response. >> >> When I try to spec this, Ruby raises a NoMethodError, saying that >> #render_to_string doesn''t exist in my controller action. >> >> Here''s the controller action, spec, and output: >> http://pastie.org/1640962 >> >> Any idea what I''m doing wrong? Thanks, >> Nick > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >