title: RSpec - losing post?
body: <p>looks like I am losing 'San Francisco' at the start of the Update test in this example - not sure why - when I do a puts response.body at the end the Post Test everything looks ok - here is my flights_spec.rb:</p>
  
  <pre><code>require 'rails_helper'
  require 'spec_helper'
  require 'flight'
  
  RSpec.describe FlightsController, type: :controller  do
  
     render_views
     let(:flight0) { Flight.create(:destination =&gt; "Las Vegas") }
  
        it "Get Test" do
          puts 'Get Test'
          get :index, :format =&gt; :json
          puts "Body = " + response.body
          expect(response.body).to include('Las Vegas')
       end
  
       it "Post Test" do
         puts 'Post Test'
         post :create, :flight =&gt; {:destination =&gt; "San Francisco"}
         puts "Post status:" + response.status.to_s
         expect(response).to redirect_to(assigns(:flight))
         redirect_to(response.headers['Location'])
         get :index, :format =&gt; :json
         puts "Body = " + response.body
         expect(response.body).to include("San Francisco")
      end
  
      it "Update Test" do
          puts 'Delete Test'
          get :index, :format =&gt; :json
          puts "Body = " + response.body
          expect(response.body).to include("San Francisco")
      end 
  end
  </code></pre>