Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smtlaissezfaire/54673 to your computer and use it in GitHub Desktop.
Save smtlaissezfaire/54673 to your computer and use it in GitHub Desktop.
[37, 46] in ./spec/controllers/session_controller_spec.rb
37 end
38
39 it "should delete the values from the session" do
40 session[:foo] = "bar"
41 require 'rubygems'; require 'ruby-debug'; debugger
=> 42 do_action
43 session[:foo].should be_nil
44 end
45
46 it "should set the signout/success flash message" do
(rdb:1) n
spec/controllers/session_controller_spec.rb:43
session[:foo].should be_nil
(rdb:1) p session
#<ActionController::TestSession:0x391cfa0 @session_id="", @attributes={"foo"=>"bar"}, @saved_attributes=nil>
(rdb:1) p session[:foo]
"bar"
(rdb:1) p controller.session
#<ActionController::TestSession:0x38fc3e0 @session_id="", @attributes=nil, @saved_attributes={"flash"=>{:notice=>"You signed out. Thanks for visiting."}}>
(rdb:1) p controller.session[:foo]
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment