Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Return of from_session_value #17

Open
nnakagaki opened this issue Mar 24, 2015 · 2 comments
Open

Return of from_session_value #17

nnakagaki opened this issue Mar 24, 2015 · 2 comments

Comments

@nnakagaki
Copy link

In the rails 3.1 version, should from_session_value return
new(flashes, discard)
instead of
new(flashes, flashes.keys)

flashes seem to be getting discarded too quickly in the test environment. Works fine in others.

@sj26
Copy link
Contributor

sj26 commented Mar 25, 2015

I'm pretty sure that logic is correct - we are only marking them for discard when the flash is next serialized, not discarding them at that point - and that is verified by the spec. Instead perhaps the version selection mechanism isn't working as expected?

@nnakagaki
Copy link
Author

Hey so the problem was in ActionPack-3.0.19::ActionController::TestCase. In the gemfile line 408, @request.session["flash"].sweep

Solutions I thought of are were overwriting the sweep method so that it does nothing, or to monkeypatch TestCase to not have that one line, and that fixes the issue in the test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants