title: RSpec set session object
body: <p>I'm trying to set a session object from my controller spec.</p>
  
  <pre><code>it 'use invalid coupon' do
    session[:coupon] = 'abcd'      
    Service.any_instance.stub(:validate_coupon).with(session[:coupon]).and_return('abcd')
  
    get :index
    expect(flash[:coupon__notice]).to be nil
  end
  </code></pre>
  
  <p>but when I inspect the session, instead of a @coupon object, I get a @data that contains the string 'coupon', and test fails.</p>