Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 594 Bytes

Upgrade.markdown

File metadata and controls

24 lines (15 loc) · 594 Bytes

Upgrade to rspec-rails-2

Controller specs

render_views

Controller specs, by default, do not render views. This helps keep the controller specs focused on the controller. Use render_views instead of rspec-1's integrate_views to tell the spec to render the views:

describe WidgetController do
  render_views
  
  describe "GET index" do
    ...

View specs

Rails changed the way it renders partials, so to set an expectation that a partial gets rendered:

view.should_receive(:_render_partial).
  with(hash_including(:partial => "widget/row"))