Created
November 17, 2014 08:58
-
-
Save jamesdavidson/fbd3e57af261fc1e747a to your computer and use it in GitHub Desktop.
rspec urgh
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
context "When I count" do | |
(0..10).each do |i| | |
puts i | |
let (:num) { i + 1} | |
it "gets cached." do | |
puts num | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Each
let
should be in its own context, or else each iteration overrides the definition used by all of theit
blocks: