Created
October 1, 2011 21:42
-
-
Save djo/1256688 to your computer and use it in GitHub Desktop.
Pseudorandom number generator stub
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
words = ['qwerty', 'abcdef', 'xyzzyx'] | |
SecureRandom.stub(:base64) { words.shift } | |
SecureRandom.base64.should eq('qwerty') | |
SecureRandom.base64.should eq('abcdef') | |
SecureRandom.base64.should eq('xyzzyx') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment