I'm having the same problem. Did you ever solve this? I'm using Rails 1.2.6 - I recently ran a conversion plugin to convert my Test::Unit tests to Rspec. Everything is working fine except this - response.body just returns the template name.
Test::Unit: xhr(:post, :add_to_cart_xhr, ...) assert_match(/Quantity is not a number/, @response.body) # <--passes Rspec xhr(:post, :add_to_cart_xhr, ...) response.body.should match(/Quantity is not a number/) #<--fails nzook wrote: > I'm having the exact problem described in this earlier post: > http://www.nabble.com/Odd-response.body-behavior-to12837556.html#a12837556 > > That is, after a post, response.body is just the controller/view string > ("user/login" in my case). > > Failing to find any answer on the web, I'm trying to trace execution, > but > hitting a bit of a snag. I'm tracing the ancestry of self inside a test > example to see where the "post" function is actually defined. I'm > getting a > hit on Spec::Rails::Example::FunctionalExampleGroup, but I cannot find > where > it is defined in this module! > ????? > > -- > View this message in context: > http://www.nabble.com/Whence-%22post%22-in-a-description--tp15988683p15988683.html > Sent from the rspec-users mailing list archive at Nabble.com. -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users