Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix set_the_flash_matcher for Rails 4
The "flashes" instance variable that lives within FlashHash has changed in Rails 4. I have added a shim to get the proper name. Additionally, the set_the_flash matcher will dup the flash hash for the controller on which it operates. As #dup does a shallow copy we need to make sure to also copy the instance variables within the flash hash when we do this. The Rails 4 version of FlashHash has an extra @discard variable unlike the Rails 3 version so we make sure to copy that.
- Loading branch information
Showing
2 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters