I'm using Rails 3.2.12, and I have a spec similar to this:

# Spec
before do
  post :create
end

it { session[:order_id].should be_nil }

# Controller
def create
  ...
  
  session[:order_id] = nil
end

Now, that spec passes/fails depending on the controller redirecting or 
rendering:

Passes: redirect_to root_path
Fails: render :create

Is this an expected behavior?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to