[rspec-devel] [ rspec-Bugs-11137 ] rspec incorrectly handles flash after resetting the session

noreply at rubyforge.org noreply at rubyforge.org
Sat May 26 16:21:41 EDT 2007


Bugs item #11137, was opened at 2007-05-25 22:31
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11137&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: devin c (quixoten)
Assigned to: David Chelimsky (dchelimsky)
Summary: rspec incorrectly handles flash after resetting the session

Initial Comment:
given an action:

def clobber_session
  reset_session
  flash[:notice] = 'where's my flash?'
end

flash[:notice] should equal 'where's my flash?', and indeed it does when tested in rails, but when tested in the spec flash is empty

def clobber_session
  flash[:notice] = 'available to rails and should be available to the spec'
  reset_session
end

however in this case, the flash should be empty because it was set before the session was cleared. again, when tested in rails the flash is cleared as expected, but for some reason it is still available in the specs.

I've attached some failing tests that demonstrate this behavior.

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-05-26 20:21

Message:
Fixed in r2044.

Thanks for the examples. Very helpful.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11137&group_id=797


More information about the rspec-devel mailing list