Upgrade.markdown in rspec-rails-2.0.0.rc vs Upgrade.markdown in rspec-rails-2.0.0

- old
+ new

@@ -1,14 +1,13 @@ -# Changes in beta.20 +# Upgrade to rspec-rails-2 -### Webrat or Capybara +## Webrat and Capybara -rspec-rails-2.0.0.beta.20 removes the dependency and offers you a choice of -using webrat or capybara. Just add the library of your choice to your Gemfile. +Earlier 2.0.0.beta versions depended on Webrat. As of +rspec-rails-2.0.0.beta.20, this dependency and offers you a choice of using +webrat or capybara. Just add the library of your choice to your Gemfile. -# Upgrade to rspec-rails-2 - ## Controller specs ### islation from view templates By default, controller specs do _not_ render view templates. This keeps @@ -26,6 +25,20 @@ Rails changed the way it renders partials, so to set an expectation that a partial gets rendered: render view.should render_template(:partial => "widget/_row") + +## as_new_record + +Earlier versions of the view generators generated stub_model with `:new_record? +=> true`. As of rspec-rails-2.0.0.rc, that is no longer recognized, so you need +to change this: + + stub_model(Widget, :new_record? => true) + +to this: + + stub_model(Widget).as_new_record + +Generators in 2.0.0 final release will do the latter.