rr

How do I write a spec to verify the rendering of partials?

I'm using rr (the mocking framework) and rspec with ruby-on-rails. Also, I'm using the collection short hand for partial rendering. My question: How do I correctly fill out the the following view spec? describe 'my_view' do before(:each) do assigns[:models] = Array.new(10, stub(Model)) end it "should render the 'listing' part...

mocking in Ruby: mocks are sticking around between tests

I'm using RR as the mocking framework for a personal project of mine. I've been using it to mock the new method for some classes and when I run the tests they pass fine, but when I run ALL of the tests I run into a problem where it seems like the "new" methods are still returning the fake results, even when in a different test file. Is...